Accented words

Feb 18, 2011 at 1:25 PM

I'm trying to send a mail by smtp protocol.  In the Subject and the BodyText there are accented words.  Example:

SmtpMessage mg = new SmtpMessage();    

mg.HeaderEncoding = Encoding.UTF8;          

mg.ContentEncoding = Encoding.UTF8;                         

mg.From = "<testtwitter@presenceco.com>";            

mg.To.Add(new Higuchi.Net.Mail.MailAddress("cmarcela@presenceco.com"));          

mg["Mime-Version"] = "1.0";            

mg.Subject = "No Attachment test ááaa!!";            

mg.BodyText = "áaaaa";

But in the email this information is displayed bad:
Subject: No Attachment test ??aa!!
Body: ?aaaa

How I can to fix this problem?  The same happens when I use Pop to download de mails.

Help me please.

Thanks.

Coordinator
Feb 19, 2011 at 10:38 AM

It seems encoding bug.
Thank you for your information, I live in Japan where accented word does not exist country.
I'll check your code and fix it.
wait few days.

Coordinator
Feb 19, 2011 at 11:19 AM

I check the code
            SmtpMessage mg = new SmtpMessage();
            mg.HeaderEncoding = Encoding.UTF8;
            mg.ContentEncoding = Encoding.UTF8;
            mg.From = "<testtwitter@presenceco.com>";
            mg.To.Add(new Higuchi.Net.Mail.MailAddress("cmarcela@presenceco.com"));
            mg["Mime-Version"] = "1.0";
            mg.Subject = "No Attachment test ááaa!!";
            mg.BodyText = "áaaaa";

            string body = mg.GetDataText();

            Pop3Message m = new Pop3Message(body);
            Assert.AreEqual(m.Subject, "No Attachment test ááaa!!");
            Assert.AreEqual(m.BodyText, "áaaaa");

It is on spec.
So C#Mail send correct data probably.
It seem mail client problem.
What mail client you use??

Feb 19, 2011 at 4:34 PM

Hello,

Thanks for your help!!!

I'm using Gmail as a client. I have only problems sending messages with accented characters (with SMTP). If I get the messages through the POP3 protocol is working correctly.

Feb 21, 2011 at 2:00 PM

Hi,

Sending mail with SMTP protocol does not write the accented  word.  If captured the mail with POP3 is working correctly.

I can have another solution?

 

Thanks,

Coordinator
Mar 12, 2011 at 10:37 AM

I want to know more detail operation you did.
like

I send GMail
Title : Mytitle
Detail : Mydetail...

And receive the mail with Pop3Message class
sample code......


It help me to solve your problem.