in reply to Re: blank lines in email
in thread blank lines in email

Thanks for the tip. I used as_string, and it shows that the module is indeed expanding the \n to \r\n.

I'm using postfix as my MTA. It sounds like postfix on a Unix system will blindly change any \n to \r\n, trying to helpfully give you the right CRLF line terminator...The extra carriage return is what's causing my problem.

According to the exim documentation, exim's MTA handles this more intelligently, which is probably why gmargo couldn't duplicate this.

This SEEMS to me like a bug in Email::Stuff or one of its dependencies. My understanding is that the Unix convention is for the MUA to use the local line terminator (a bare newline), and that the MTA is responsible for massaging this correctly for internet delivery...

Replies are listed 'Best First'.
Re^3: blank lines in email
by gmargo (Hermit) on Jan 18, 2010 at 23:18 UTC

    Can you please post exactly what Linux distribution and version you are using? And versions of the relevant modules? I'll see if I can duplicate your setup in a virtual machine.

      Ubunutu 9.04 Jaunty

      Email-Date-Format-1.002
      Email-MIME-1.903
      Email-MIME-Encodings-1.313
      Email-Simple-2.100
      Email-Stuff-2.101

      I also observe the same behavior on a SLES10 machine with the same modules and versions.

      On another SLES10 machine with older modules, I don't see this behavior, i.e., when I use as_string, the lines are terminated by \n, not \r\n. The versions on that machine are:

      Email-Date-Format-1.002
      Email-MIME-1.863
      Email-MIME-Encodings-1.313
      Email-Simple-2.005
      Email-Stuff-2.09
Re^3: blank lines in email
by jason_s (Acolyte) on Jan 18, 2010 at 23:15 UTC
    I tried the same test using Email::Sender::Simple and MIME::Lite. Both of those modules did the right thing. I guess I'll just switch to using one of them.