+1 vote

We bought your Mail.dll product a few months ago and everything works fine, but I have a question about email headers generated by Mail.dll

When we send an email to someone, the dll adds a Message-ID field to the header like this: 1450360e-8678-4827-b5ea-4f708cfb32f6@mail.dll

But we want to change the format of the ID, for instance I need to remove @mail.dll section. is it possible?

by

1 Answer

0 votes
 
Best answer

It is possible.

Simply set the MessageID property on the MailBuilder instance or on the final IMail object instance:

MailBuilder builder = new MailBuilder();
builder.Text = "Plain text";
builder.MessageID = "1234@example.com";
IMail email = builder.Create();

By default MailBuilder class generates several properties if they are empty, so that resulting email is RFC compliant. Those include Date header, Message-ID header and Sender (when there is more than one From email defined) header.

You can disable this behavior by setting MailBuilder.SetDefaults property to false.

by (301k points)
...