ContentTransferEncoding sets the encoding for the email.
The default is set to 7bit encoding. The following values are valid for ContentTransferEncoding MailEncoding.Base64 = Base64 Encoding MailEncoding.Bit7 = 7 Bit Encoding MailEncoding.Bit8 = 8 Bit Encoding MailEncoding.QuotedPrintable = QuotedPrintable encoding If ContentTransferEncoding = MailFormat.QuotedPrintable, aspNetEmail will automatically encode the body of the email to quoted-printable format. All other encoding schemes are left up to the user of the component.
[C#]
EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
msg.FromAddress = "me@MyCompany.com";
msg.To = "you@YourCompany.com";
msg.ContentTransferEncoding = MailEncoding.QuotedPrintable;
msg.Subject = "Daily Newsletter";
msg.Body = "Here is our daily newsletter.....";
if ( msg.Send() )
{
Console.WriteLine( "Message Sent!");
}
else
{
Console.WriteLine( msg.LastException().Message );
}
[Visual Basic]
Dim msg As New EmailMessage("mail.MyCompany.com")
msg.FromAddress = "me@MyCompany.com"
msg.To = "you@YourCompany.com"
msg.ContentTransferEncoding = MailEncoding.QuotedPrintable
msg.Subject = "Daily Newsletter"
msg.Body = "Here is our daily newsletter....."
If (msg.Send()) Then
Console.WriteLine("Message Sent!")
Else
Console.WriteLine(msg.LastException().Message)
End If