0

I am using System.Net.Mail.Attachment for email attachment.

 Attachment attachment = new Attachment (attachementFile);

But my attachementFile is from s3 file url and it contains #. Therefor I got this error. "The given path's format is not supported."

How can I fix this issue ?

Isuru
  • 530
  • 3
  • 9
  • 25
  • Could you pleas clarify why you [read](https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.attachment.-ctor?view=netframework-4.7.2#System_Net_Mail_Attachment__ctor_System_String_) "fileName - A String that contains a *file path* to use to create this attachment" as "fileName is URI"? – Alexei Levenkov Nov 21 '18 at 07:16
  • yes. attachementFile is a URL. It contains a #. – Isuru Nov 21 '18 at 09:14
  • So you've read documentation which said you need to pass *file path* but disagreed with that and pass *URI* instead... I'm not sure how to help you in this case, sorry. – Alexei Levenkov Nov 21 '18 at 18:32

0 Answers0