?
=?ISO-8859-2?Q?Grzegorz_=A6lusarek?=
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'] = '(e-mail address removed)'
Message['To'] = '(e-mail address removed)'
SMTPServer=smtplib.SMTP(ConfigurationManager.SMTPServer)
SMTPServer.sendmail('(e-mail address removed)','(e-mail address removed)', 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?
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'] = '(e-mail address removed)'
Message['To'] = '(e-mail address removed)'
SMTPServer=smtplib.SMTP(ConfigurationManager.SMTPServer)
SMTPServer.sendmail('(e-mail address removed)','(e-mail address removed)', 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?