procmail
[Top] [All Lists]

Re: header and body as separate values to one script

2001-07-23 13:01:20
On Mon, Jul 23, 2001 at 04:34:29PM +0200, Marc van Duivenvoorde wrote:
I can pipe the email to a perl script and do stuff with it, but now I want
to put the header and body as seperate values to the script in one time.
Because I don't know how to seperate them using perl and I want to put some
email in a databse for later reference (like this mailing list).

Or does anyone know how to do it in perl.

I can't give you the exact code, but it's easy enough. Just search for the
first blank line (or more specfically, two consecutive newlines). Everything
before the double newlines is the header. Everything after is the body.

-- 
Every man should know how to make at least one drink from a foreign country,
preferably one taught to him by a local female with whom he has had a
complicated, unresolved, and quite possibly dangerous dalliance.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>