Hi all. I sending email using standard python modules smtplib, email, 
coding email in utf but subject of message is not coded properly. In 
subject i use my national characters (polish) and after send i get XX in 
place these characters.
Here is the code

Message = email.message_from_string(pMessage)
        Message.set_charset('utf-8')
        Message['From'] = '[EMAIL PROTECTED]'
        Message['To'] = '[EMAIL PROTECTED]'
        SMTPServer=smtplib.SMTP(ConfigurationManager.SMTPServer)
        SMTPServer.sendmail('[EMAIL PROTECTED]','[EMAIL PROTECTED]', 
Message.as_string())

Message looks like this:
        Subject: Nowe hasło
        \n
        \n
        Nowe email z haslem......

I looked how smtp serwer see my message and I notice that it looks like 
content of the message is convert by BASE64 but not the subject. What 
I'm doing wrong? can anyone tell me?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to