[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Select body of a mailbox



At 1:22 AM +0200 8/8/00, Giorgio Valoti wrote:
>Hi all,
>I'd like to select the body of every email in mailbox file... This
>mailbox is just a list of messages separated with a new line; of course,
>i've already found a way to select the mail headers, but what about the
>body of the messages?
>TIA

This doesn't sound like a "normal" mailbox like Eudora or most Unix 
mail clients use, where messages are separated by lines that match 
the regex /^From\s/.  If it was, you could use Mail::Util::read_mbox 
(part of MailTools) to separate the individual messages.

In a normal mail message, everything from the beginning to the first 
blank line is header, while everything after that to the end of the 
message is body.  So look for the first blank line, and everything 
after it is body.

>
>--
>Giorgio Valoti
>
>MagneticMedia Network
>
># ===== Want to unsubscribe from this list?
># ===== Send mail with body "unsubscribe" to macperl-request@macperl.org

-- 
--
Paul Schinder
schinder@pobox.com

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org