On Wed, Apr 28, 2010 at 9:38 AM, Leo <leo.shklovs...@gmail.com> wrote: > This is a fun one. If I do the following code in Django: > > from django.core.mail import EmailMessage > message = EmailMessage('blah', 'From puppies','b...@hope.com', > ['b...@hope.com']) > message.send() > > The message that appears on the other end has this in the body: > > >From puppies > > A From at the beginning of any lines in the body gets a > prepended to > it.
This is the sort of bug that makes me want to give up my material possessions and go live in a cave somewhere. Ugh. > I submitted this as a ticket - http://code.djangoproject.com/ticket/13433 > - and I'm happy to do patches/test/docs as appropriate but I'd love to > get some thoughts on the best approach to fix it. It's not pretty, but I really don't see much of an alternative, either. My only question is whether overriding __str__ is the right place; given that as_string() is the affected interface, it seem like that should be the method that is fixed. However, that's just based on an initial inspection; I'm willing to be convinced that I'm wrong on that one. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.