Grzegorz ¦lusarek:
>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())

I see no subject in this code.

"If you want to include non-ASCII characters in your email headers, say in
the Subject: or To: fields, you should use the Header class and assign the
field in the Message object to an instance of Header instead of using a
string for the header value."
http://docs.python.org/lib/module-email.Header.html

-- 
René Pijlman
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to