Re: preserving "From " lines in mail messages
Mark Overmeer <[email protected]> Sun, 5 Dec 2004 15:20:13 +0100
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* Mark Senn ([email protected]) [041205 05:06]: > the "From " lines, are not preserved. In the mail message > below the "From " lines may be prefixed with a ">", those > ">" characters aren't in the test file. What do I need to > do to preserve the "From " lines? (I looked and didn't > notice the answer in the documentation---sorry if I missed > it.) Thanks. Mark Senn The 'From ' lines are not part of the message, but only leading it in some occations. There is a large variety in syntax... Besides, the "From " separator line in mbox-mailboxes can be confused with lines contained in the message which start with From. Good applications therefore escape those included From lines with a '>'. MailBox will add missing >'s. If you are reading an mbox folder (which I presume you do), the from line is kept separately from the header and the body. You can do: $msg->write includes the leader and get the 'From's escaped. Or print $msg->fromLine; $msg->print; which shouldn't be escaped... Hope this is clear enough. -- Success, MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net