Attachment attachment = new Attachment(@"d:\4mb.dat");
// This is the problem code, to workaround the issue make sure you are not using Base64 as encoding
// attachment.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
// Any of those two code section will work
// attachment.TransferEncoding = System.Net.Mime.TransferEncoding.QuotedPrintable;
attachment.TransferEncoding = System.Net.Mime.TransferEncoding.SevenBit;
msg.Attachments.Add(attachment);
No comments:
Post a Comment