Menu

Adding attachment as Stream

Valerio
2019-08-30
2020-02-27
  • Valerio

    Valerio - 2019-08-30

    Hi,

    how can I add attachment as Stream?

     
  • Fadil

    Fadil - 2020-02-27

    I found that this feature does not work. It adds the attachment as inline only and all mail servers reject this.

    var ms = new MemoryStream(<byte[]>);
    var attachment = new MimeAttachment(ms, <file name="">, new ContentType("application/pdf"), AttachmentLocation.Attachmed);
    mymessage.Attachments.Add(attachment);</file></byte[]>

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.