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);