To solve problem with encoding we first need to diagnose when the problem arises.
It can be in three places:
- The massage is encoded incorrectly when created (before send)
- The message is encoded incorrectly when sent (in SMTP layer)
- The message is encoded incorrectly when received (in IMAP layer)
Can you please save the message before you send it and ensure the message is encoded correctly? It can be done as follows:
MailMessage mail = new MailMessage();
// set the mail From, To, Subject, Body etc.
// then save the mail
mail.Save("file_path.eml");
If the message is encoded incorrectly please specify the message encoding as follows:
mail.DefaultCharset = Encoding.UTF8;
or
mail.DefaultCharset = Encoding.GetEncoding("windows-1251");
If the recipient still cannot display the message correctly, please send us a screenshot of incorrectly displayed message. We will give you further advise.
The "Another operation is pending"
exception is thrown when you call BeginXYZ method and then you call another method without calling the corresponding EndXYZ method. The exception is also thrown when you call a method from the second thread before a method called from the first thread is finished.