When i send a email from my site to Uniform http://co.za registrar and cc myself in the mail i get an email returned from them that they received the email, but cannot find some of the information as it has those funny characters added to it. I saw that there was a previous post on the site but none of the answers seem to work for me, and i tried alot of post and blog on google.
The entire body of the email is constructed of the template you get from the registrar site and i used etc as the detail i need to populate and replace those, then send the body of the email off to the registrar.
EX:
1a. Complete domain name: < domainname >
gets replaces with the domain name exmaple.co.za
My Code:
MailMessage emailmsg = new MailMessage("myemail@domain.co.za", "coza-admin@co.za");
emailmsg.Subject = "N domain domain.co.za";
emailmsg.Bcc.Add("myemail@domain.co.za");
emailmsg.Body = Body;
emailmsg.IsBodyHtml = false;
var plainView = AlternateView.CreateAlternateViewFromString(Body, new ContentType("text/plain; charset=iso-8859-1"));
plainView.TransferEncoding = TransferEncoding.SevenBit;
emailmsg.AlternateViews.Add(plainView);
SmtpClient sSmtp = new SmtpClient();
sSmtp.Send(emailmsg);
This code send a bcc copy to myself and from the looks of it through outlook all seems fine and i should be but when they receive it the characters gets added. it seems to randomly add those characters. then obviously the request fails as the seconds name server cannot be found.
Returned Email:
Administrative Info
Contact: Administrator=0D=0A 4b. Title/posi= (Administrator)
Company: CompanyName Ltd
Postal: P.O Box 12841, Centrahill, 6006
Phone: +27.00000000=0D=0A 4f. Fax Number: +27.00000000=
Provided Nameserver information
Primary Server : ns1.nameserver.co.za
Secondary 1 : ns2.nameserver.co.za=0d=0a,
Any help would be appreciated.
note: the registrar requires the the email be in plain text and not base64 or html whatsoever as their system picks up plain/text email and faxes and automatically processes them.
Thanks