+1 vote

Could I determine the mime type of files using your Mail.dll? However these files aren't email attachments.

by

1 Answer

0 votes
 
Best answer

When the file is added to an email as a attachment (using MailBuilder class), ContentType is set according to the file's extension:

 MailBuilder builder = new MailBuilder();
 MimeData attachment = builder.AddAttachment("c:\\report.xml");

 Assert.AreEqual(ContentType.TextXml, attachment.ContentType);
by (301k points)
...