+1 vote

It's possibile to define the body font (name and size) when IsBodyHtml = False ?

by

1 Answer

0 votes

IsBodyHtml property is not part of the Mail.dll.

Mail.dll offers much nicer way of creating messages, using fluent interface:

IMail email = Mail
    .Html(@"Html with an image: <img src=""cid:lena"" />")
    .AddVisual(@"c:\lena.jpeg").SetContentId("lena")
    .AddAttachment(@"c:\tmp.doc").SetFileName("document.doc")
    .From("from@example.com")
    .To("to@example.com")
    .Subject("Subject")
    .Create();

...or builder approach:

 MailBuilder builder = new MailBuilder();
 builder.From.Add(new MailBox("from@example.com"));
 builder.To.Add(new MailBox("to@example.com"));
 builder.Subject = "This is HTML test";
 builder.Html = @"Html with an image: <img src=""cid:lena"" />";

 MimeData image = builder.AddVisual(@"c:\lena.jpeg");
 image.ContentId = "lena";

 MimeData attachment = builder.AddAttachment(@"c:\tmp.doc");
 attachment.FileName = "document.doc"

 IMail email = builder.Create();

You can't specify font/size when sending plain text emails.
Plain text emails are just that - plain text - no formatting is present.

This is the limitation of email format itself, not the library you use to create them.

by (297k points)
...