Characterset of the Attachment object
[C#]
EmailMessage m = new EmailMessage("127.0.0.1" );
m.From = "me@mycompany.com";
m.To = "you@yourcompany.com";
m.Subject = "testing email";
m.Body = "the body text goes here...";
//enable logging for any troubleshooting problems
m.Logging = true;
m.LogPath = "c:\\email.log";
//create an attachment
Attachment a = new Attachment( "c:\\temp\\report.txt", MailEncoding.QuotedPrintableMinimal, Encoding.GetEncoding("iso-8859-1" ) );
//set the characterset
a.CharSet = "iso-8859-1";
m.AddAttachment( a );
//send
m.Send();
[VB.NET]
Dim m As New EmailMessage("127.0.0.1")
m.From = "me@mycompany.com"
m.To = "you@yourcompany.com"
m.Subject = "testing email"
m.Body = "the body text goes here..."
'enable logging for any troubleshooting problems
m.Logging = True
m.LogPath = "c:\email.log"
'create an attachment
Dim a As New Attachment("c:\temp\report.txt", MailEncoding.QuotedPrintableMinimal, Encoding.GetEncoding("iso-8859-1"))
'set the characterset
a.CharSet = "iso-8859-1"
m.AddAttachment(a)
'send
m.Send()