Question

I am sending a mail to an email address which forwards messages to a pager. The message I am sending is

"Oth info; Thankyou testing now complete just be aware that 34a door will open and shut when pager messages are sent with the CFSRES lt1".

but client receives it on his pager as

"Oth info; Thankyou testing now complete just be aware that 34a door will op= en and shut when pager messages are sent with the CFSRES lt1".

Does anyone know why the equals sign shows up in open changed to op= en. I know that special characters may some times be changed, like spaces can become %20, but open does not contain any special character, so as far as I know, nothing should happen to it.

Was it helpful?

Solution 2

I search for net and found the solution, this links solve my problem. Here is some userfull code, i need to provide the CreateAlternateViewFromString.

MailMessage emailmsg = new MailMessage("from@address.co.za", "to@address.co.za")
emailmsg.Subject = "Subject";
emailmsg.IsBodyHtml = false;
emailmsg.ReplyToList.Add("from@address.co.za");
emailmsg.BodyEncoding = System.Text.Encoding.UTF8;
emailmsg.HeadersEncoding = System.Text.Encoding.UTF8;
emailmsg.SubjectEncoding = System.Text.Encoding.UTF8;
emailmsg.Body = null;

var plainView = AlternateView.CreateAlternateViewFromString(EmailBody, emailmsg.BodyEncoding, "text/plain");
plainView.TransferEncoding = TransferEncoding.SevenBit;
emailmsg.AlternateViews.Add(plainView);

SmtpClient sSmtp = new SmtpClient();
sSmtp.Send(emailmsg);

OTHER TIPS

This is a sign of Quoted-printable encoding

QP works by using the equals sign "=" as an escape character. It also limits line length to 76, as some software has limits on line length.

So you may try to split the message into multiple lines in an attempt to prevent escape characters being added by the forwarder.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top