Open undead85 opened 12 years ago
Check Content-Description and Content-ID (message.Attachments.Headers["Content-Description"] and message.Attachments.Headers["Content-ID"])
Either one of those usually gets me the filename You will have to parse them looking for something like name="filename.ext" Can you work with those instead?
I am also having this trouble and this workaround didn´t work neither because there is no message.Attachments.Headers
each attachment has a Headers (Or used to anyway - am not using the latest version yet) don't have my code at hand just now but use something like:
foreach(Attachement a in message.Attachements)
MessageBox.Show(a.Headers["Content-Description"]);
There also used to be a RawHeaders that was better than Headers although you would have to parse the value yourself
Not all MIME parts are guaranteed to have a Content-Disposition header. MIME parts don't even necessarily need to have any headers at all. This is all explained in the rfcs...
Some email don't have Content-Disposition and i cant get attachments.