I\'m try save attachments from message
foreach(MimeKit.MimeEntity at message.Attachments)
{
at.WriteTo(\"nameFile\");
}
File saved, bu
You are saving the entire MIME object (including the headers). What you need to do is save the content.
foreach (var attachment in message.Attachments) {
using (var stream = File.Create ("fileName")) {
if (attachment is MessagePart) {
var part = (MessagePart) attachment;
part.Message.WriteTo (stream);
} else {
var part = (MimePart) attachment;
part.Content.DecodeTo (stream);
}
}
}
Hope that helps.