Re: Bounce composition
| From: | Oliver Block | Date: | Wed, 02 May 2007 19:57:37 +0000 |
| Subject: | Re: Bounce composition | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254260@lists.php.net to get a copy of this message | ||
Am Mittwoch, 2. Mai 2007 20:11 schrieb Richard Lynch:
> Does anybody have or know of a good simple PHP script that can take an
> email as an input, and compose a "Bounce" email as output?
>
> I need something that does just that, without a huge framework or a
> zillion other "features"...
please try this:
$env['from'] = 'ceo@l-i-e.com';
$env['to'] = 'ceo@t-r-u-t-h.com';
$env['remail'] = imap_fetchheader($stream, $msgno);
$part0['contents.data'] = imap_body($stream, $msgno);
$body[0] = $part0;
$bounce_msg = imap_mail_compose($env, $body);
Not you should get rid of the 'Received-' headers.
I did not test it. If something goes wrong, please post again.
Regards,
Oliver