Avatar ·

Encoding when sending a message

📁 question, example

Dmitry Derevyankin. Thank you very much for the example, I easily implemented it myself. But there is a problem. If msg = MIMEText('') contains only Latin characters, then everything is fine. But if it is Cyrillic, then encoding problems arise: a = ""blaha"" part = MIMEText(a)

Result: бляха

At the same time, the subject of the letter is displayed normally in both Latin and Cyrillic. Thank you in advance for answering a stupid noob question.