jstedfast / MailKit

A cross-platform .NET library for IMAP, POP3, and SMTP.
http://www.mimekit.net
MIT License
6.17k stars 818 forks source link

Iterating through attachments does not provide a name for the attachment #1709

Closed dgxhubbard closed 7 months ago

dgxhubbard commented 7 months ago

When we iterate through attachments we get a list of MimeEntity, but the MimeEntity does not provide a name to the attachment. Is CurrentLocation the name of the attachment?


                            foreach ( var attachment in emailMessage.Attachments )
                            {
                                var bytes = attachment.ToString ();
                                var contentType = attachment.ContentType;
                                var name = attachment.ContentLocation.ToString ();

                            }
jstedfast commented 7 months ago

See the FAQ: https://github.com/jstedfast/MailKit/blob/master/FAQ.md#save-attachments

dgxhubbard commented 7 months ago

@jstedfast Thank you