in reply to Modify and redirect SMTP mail help!

I'm a big fan of Mail::Audit, so my way to accomplish this would be something like (untested)

use Mail::Audit; # read message from STDIN my $mail = Mail::Audit->new(); $mail->delete_header("Message-ID"); # set To: header if you want to # (not necessary for resend(), just for the look of it) $mail->replace_header("To", "Some Guy <someone@somewhere.com>"); $mail->resend("someone@somewhere.com");

Note that your MTA might add a new Message-ID for you if you don't specify one. This is beyond Mail::Audit's control.

Replies are listed 'Best First'.
Re: Re: Modify and redirect SMTP mail help!
by Limbic~Region (Chancellor) on May 02, 2003 at 17:58 UTC
    crenz,
    Thanks - this looks exactly what I am looking for.

    Cheers - L~R

    Update: crenz mentioned this module to me in the CB, but I was confused - big surprise.

      I was the one that mentioned it :). In the meantime, I took a quick look at Mail::Audit's source. It doesn't seem to create a tempfile. However, if this is an important issue to you and you want to be really sure, make sure you review Mail::Internet and MIME::Entity as well, since Mail::Audit makes use of them.