in reply to Creating MIME entities with CRLF line endings

Besides dk's suggestion it might be a good idea to contakt the author of MIME::Entity.

Reading perldoc perlipc reveals this:

Internet Line Terminators

The Internet line terminator is "\015\012". Under ASCII variants of Unix, that could usually be written as "\r\n", but under other systems, "\r\n" might at times be "\015\015\012", "\012\012\015", or something completely different. The standards specify writing "\015\012" to be conformant (be strict in what you provide), but they also recommend accepting a lone "\012" on input (but be lenient in what you require).

We haven't always been very good about that in the code in this manpage, but unless you're on a Mac, you'll probably be ok.

So if MIME::Entity has hardcoded \n instead of \015\012, either there is some way to make sure \n spits out \015\012 and you haven't read the documentation fully (I haven't), or the author didn't know about the standard.


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^2: Creating MIME entities with CRLF line endings
by sgifford (Prior) on Mar 16, 2007 at 19:19 UTC
    Hi Skeve,

    Normally local mail messages are handled with local line endings, and the MTA takes care of line ending conversions if the message is sent ove rSMTP (which is why binary attachments are normally encoded as text. For example, if you send a message with sendmail or Net::SMTP, those programs will handle the line conversions for SMTP.

    So, it's not really a bug (or even that surprising) that MIME::Entity generates messages with local line endings, but it would be nice to be able to override it easily.

      Thanks for the explanation.

      s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
      +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e