Re: Sending emails with special characters

2008-04-20 Thread Julien
Thanks Malcolm, I opted for the Django solution and it worked indeed. Here's the new code: from django.conf import settings from django.core.mail import EmailMultiAlternatives, SMTPConnection smtp_server='XXX' # Only because I want to use different settings than the default ones smtp_us

Re: Sending emails with special characters

2008-04-19 Thread Malcolm Tredinnick
On Sat, 2008-04-19 at 00:43 -0700, Julien wrote: > Thanks for the hints. > > I'm maintaining the code done by another developer: [... snipped ...] > > As you see, after your comments I added the force_unicode function > call, but it didn't fix the problem. I tried to look into Django code > bu

Re: Sending emails with special characters

2008-04-19 Thread Julien
Thanks for the hints. I'm maintaining the code done by another developer: from django.conf import settings from django.template import Context, Template from django.utils.encoding import force_unicode from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from email.

Re: Sending emails with special characters

2008-04-18 Thread Malcolm Tredinnick
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

Re: Sending emails with special characters

2008-04-18 Thread Louis Orenstein
It sounds like you will need to encode those characters in something like UTF-8 or some other character set. I'm not sure how you would go about doing that, but maybe the smtp object you create has a field or option specifying the character set with which to encode the email? Louis Julien wr

Sending emails with special characters

2008-04-18 Thread Julien
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 subsc