There is AddressHeaderRenderMode
enum with following values: NoHeader
, EmptyHeader
, Full
.
By default AddressHeaderRenderMode.EmptyHeader
is used, except for Yahoo servers (since version 3.0.22105.1207) where no BCC is used.
You can set it on Smtp client's SmtpConfiguration
:
using(Smtp client = new Smtp())
{
client.Configuration.BccRenderMode =
AddressHeaderRenderMode.NoHeader;
...
client.SendMessage(email)
}
When rendering you can use IMail.Render(AddressHeaderRenderMode bccRenderMode)
overload:
MailBuilder builder = ...;
IMail email = builder.Create();
var eml = email.Render(AddressHeaderRenderMode.NoHeader);
Or use MailRenderConfiguration
when creating SmtpMail
:
Smtp client = ....
SmtpMail smtpMail = SmtpMail.CreateFrom(
email,
new MailRenderConfiguration
{
BccRenderMode = AddressHeaderRenderMode.NoHeader
});
client.SendMessage(smtpMail)