I've got a PHP script that my mail server is piping emails to via STDIN. Is there a straightforward/non-convoluted way to take a raw email string and send/forward/relay it to a specific email address?
I hesitate to use PHP's
Pear::Mail because, as far as I can tell, I can't just pass along the raw email. I'd have to parse the headers, thereby running the risk of stripping or altering the original email's contents.
What would be the recommended way to do this with minimal "molesting" of the original email contents?
Note: If there isn't a built-in approach, are there any existing libraries that might help me do this?