Re: EmailMessage mangles body text

2010-04-29 Thread Hanne Moa
On 28 April 2010 16:13, Vinay Sajip wrote: > On Apr 28, 1:11 pm, Hanne Moa wrote: >> the-real-solution-is-to-ditch-SMTP-ly yours, >> HM, postmaster > > And your suggestion for a replacement would be ... what? I would say it doesn't exist yet.

Re: EmailMessage mangles body text

2010-04-28 Thread Ian Clelland
On Wed, Apr 28, 2010 at 10:00 AM, Rob Hudson wrote: > On Tue, Apr 27, 2010 at 6:38 PM, Leo wrote: > > Digging deep into Python's innards reveals that this is a somewhat > > esoteric protection in case you're writing out Unix mailbox files. The > >

Re: EmailMessage mangles body text

2010-04-28 Thread Tom Evans
On Wed, Apr 28, 2010 at 6:00 PM, Rob Hudson wrote: > Wouldn't these e-mails end up on other servers that might save the > message in a Unix mailbox format?  And if so, wouldn't removing the > ">" from the "From" cause problems? > > -Rob No - not unless the local MTA cannot

Re: EmailMessage mangles body text

2010-04-28 Thread Rob Hudson
On Tue, Apr 27, 2010 at 6:38 PM, Leo wrote: > Digging deep into Python's innards reveals that this is a somewhat > esoteric protection in case you're writing out Unix mailbox files. The > specific issue is here: >

Re: EmailMessage mangles body text

2010-04-28 Thread Leo
The patch is done and attached to the ticket. I also had to clean up the doctest for django.core.mail a bit. Some of them were not working as intended since they didn't use the syntax in their expected output. I suspect that issue exists in other doctests but I'm not volunteering to go fix them

Re: EmailMessage mangles body text

2010-04-28 Thread Leo
Thanks Russ! >>> 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. It looks like you're right. as_string() is the right method to override. I'll put a patch together.

Re: EmailMessage mangles body text

2010-04-28 Thread Vinay Sajip
On Apr 28, 1:11 pm, Hanne Moa wrote: > the-real-solution-is-to-ditch-SMTP-ly yours, > HM, postmaster And your suggestion for a replacement would be ... what? Regards, Vinay Sajip -- You received this message because you are subscribed to the Google Groups "Django

Re: EmailMessage mangles body text

2010-04-28 Thread Russell Keith-Magee
On Wed, Apr 28, 2010 at 1:52 PM, Leo wrote: >> This is the sort of bug that makes me want to give up my material >> possessions and go live in a cave somewhere. Ugh. > > You can imagine the fun we had tracking it down throughout the stack > trying to isolate the error

Re: EmailMessage mangles body text

2010-04-28 Thread Hanne Moa
On 28 April 2010 03:38, Leo wrote: > This is a fun one. A bit like finding fossils, methinks. > 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. The

Re: EmailMessage mangles body text

2010-04-27 Thread Leo
> This is the sort of bug that makes me want to give up my material > possessions and go live in a cave somewhere. Ugh. You can imagine the fun we had tracking it down throughout the stack trying to isolate the error case. It made me want to throw my hands up and declare that programming is just

Re: EmailMessage mangles body text

2010-04-27 Thread Russell Keith-Magee
On Wed, Apr 28, 2010 at 9:38 AM, Leo 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