Imap cyrillic mail
- by atredis
I use the mailsystem.NET library to put a message in my inbox. This is my code:
Imap4Client imap = new Imap4Client();
imap.ConnectSsl("imap.gmail.com", 993);
imap.Login(mylogin, mypassword);
Mailbox mails;
mails = imap.SelectMailbox("INBOX");
Message commomMessage = new Message();
commomMessage.From = new Address("someAddress", "someName");
commomMessage.To.Add(mylogin, "myName");
commomMessage.Subject = "someSubject";
commomMessage.BodyHtml.Text = "?????? ???";//or some cyrillic text
commomMessage.Date = DateTime.Now;
mails.Append(commomMessage);
When I open my gmail inbox, I see this mail, but the body contains ????? ??? rather than "?????? ???". If commomMessage.BodyHtml.Text contains only Latin characters, there is no problem.