Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Purdy (2383)

AOL IM: EmeraldWarp (Add Buddy, Send Message)
Yahoo! ID: jpurdy2 (Add User, Send Message)

Bleh - not feeling creative right now. You can check me out on PerlMonks [].

Journal of Purdy (2383)

Tuesday June 29, 2004
08:33 AM

Today's Lesson

[ #19572 ]

I was sending out some e-mails through a program and when I received it in Thunderbird, one of the lines had a ">" at the front. I went through several layers of trying to figure out what was going on, including changing code, outputting the MIME::Lite object to a filestream and doing an od -c through it and more.

Finally, I was just about to ask on Perlmonks and I thought, why not change the copy itself ... so I went through several variations and I figured out that if the line starts with "From" (the line originally read "From here, you can ..."), either the mail server or my mail client (my co-worker's Outlook would do the same, so methinks Postfix is doing this) are tweaking the message copy so that the line that starts with "From ..." doesn't interfere with the message header.

Interesting... in this case, I just changed the copy and moved on, but what if I REALLY wanted to start the line with From?


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • It's a problem with the mbox format []. Different programs seem to do the escaping and unescaping of "From " lines in the body in incompatible ways, so there's no guarantee you won't get stray greater-thans. Sometimes I rewrite or rewrap my message to avoid "From " at the start of a line. (Note that this has nothing to do with the "From:" header.)
  • There's a trivial solution: just encode the character. mutt does this, f.ex.

    perl -MMIME::QuotedPrint -le'print decode_qp "=46rom"'