public void ContentType()
{
Attachment attach = Attachment.CreateAttachmentFromString("test", "attachment-name");
Assert.NotNull(attach.ContentType);
Assert.Equal("text/plain", attach.ContentType.MediaType);
Attachment a2 = new Attachment(new MemoryStream(), "myname");
Assert.NotNull(a2.ContentType);
Assert.Equal("application/octet-stream", a2.ContentType.MediaType);
}