tags:

views:

29

answers:

1

Hello,

In my Python application, I would like to be able to send mail to addresses like っていった@example.jp, [email protected], or even عرض@وزارة-الأتصالات.مصر, which are perfectly valid.

When passing the address as UTF-8, I get an UnicodeDecodeException. If I encode the address with address.encode('utf-8'), no Python error but I get bounce mail explaining Diagnostic-Code: smtp; 501 Malformed RCPT TO: - psmtp.

What's the way to make everything work ?

Thanks.

+1  A: 

Make sure the server you're talking to includes UTF8SMTP in its EHLO response. Otherwise it doesn't support rfc5336. You can tell by using telnet or netcat to connect to the server and pretending to be an SMTP client.

Nathon
Yep, thanks. Seems like the packaged version of Postfix in Ubuntu doesn't support that feature...
Pierre