On Fri, 2008-04-18 at 16:18 -0700, Julien wrote:
> Hi,
> 
> We have a newsletter app which sends a bulk of a thousand emails every
> fortnight to our subscribers. Subscribers can choose to receive the
> newsletter in HTML of plain text format. The name of each subscriber
> is added at the top of the message (e.g. "Dear Mr. Smith, blabla").
> 
> One of our subscriber has a name with special characters, 'č' and 'ć',
> and the sending always fails. I get the error:
> 
> exceptions.UnicodeEncodeError - 'ascii' codec can't encode character
> u'\u010d' in position 171: ordi
> 
> I'm using smtp.sendmail(). Is there any way to send an email including
> that sort of characters?

Django's trunk handles UTF-8-encoded data and unicode data transparently
in email (see [1] for some early evidence of this).

[1] http://flickr.com/photos/malcolmtredinnick/503502258/

If you are asking whether you can do it with Python's raw mail handling
libraries, then, obviously, "yes" (since Django does it) and you could
look at how Django's source does it for some clues.

Regards,
Malcolm

-- 
If at first you don't succeed, destroy all evidence that you tried. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to