+1 vote

It is possible to add attachments, if I create the email from existing eml or existing email in general? If yes, how?

by

1 Answer

0 votes
 
Best answer

You need to use IMail.ToBuilder method to create a MailBuilder use that to add attachment and then Create to create new IMail instance.

var eml = ...;
IMail email = new MailBuilder().CreateFromEml(eml);
MailBuilder builder = email.ToBuilder();
builder.AddAttachment("c:\\report.pdf");
IMail email2 = builder.Create();
by (301k points)
...