I've got an email message represented by a string, it already contains all headers, attachments, etc. What I need to do is to forward that email to another address and I don't want to touch that string at all, all contents of it must remain untouched. So, ideally it should look like this:
forward_email('forward_address@example.com', $original_message)
Code samples would be nice, since I'm not a PHP guy, just had to use it for scripting today.
UPDATE
I have to clarify, because maybe that's not what I need at all.
I have a postfix alias, which forwards all incoming mail to a pipe command, which is a php script. In that script I take all STDIN, which is email message, and make a POST request to a web-service, which parses the email message.
I need to forward that email to a backup mailbox in case of unsuccessful web-service call to be able to pull it from my app later. Any suggestions?