L
Lisa
Does anyone know how to insert a line into the body of an eMail b4 your
forward it?
I wan to take the original recipient eMail address and add it as a
single line at the top of the body of the message, then send the
message to a different address.
this code all works, I just don't know how to insert the line into the
body.
use Mail:
OP3Client;
use Mail::MboxParser::Mail;
my $pop = new Mail:
OP3Client( USER => "foo.bar\@foobar.com",
PASSWORD => "FoOBaR",
HOST => "foobar.com",
DEBUG => 0 );
for my $i (1 .. $pop->Count) {
my %EmailHeader = get_header_hash($i);
#$EmailHeader{'Envelope-to'} <-now containes original addressee, and
this is what I want to insert into the TOP of the body prior to sending
it (below)
my $Msg =
Mail::MboxParser::Mail->new([$pop->Head($i)],[$pop->Body($i)]);
my $mail = $Msg->make_convertable;
$mail->replace_in_header('to', '(e-mail address removed)');
$mail->send('sendmail');
}
Thanks
forward it?
I wan to take the original recipient eMail address and add it as a
single line at the top of the body of the message, then send the
message to a different address.
this code all works, I just don't know how to insert the line into the
body.
use Mail:
use Mail::MboxParser::Mail;
my $pop = new Mail:
PASSWORD => "FoOBaR",
HOST => "foobar.com",
DEBUG => 0 );
for my $i (1 .. $pop->Count) {
my %EmailHeader = get_header_hash($i);
#$EmailHeader{'Envelope-to'} <-now containes original addressee, and
this is what I want to insert into the TOP of the body prior to sending
it (below)
my $Msg =
Mail::MboxParser::Mail->new([$pop->Head($i)],[$pop->Body($i)]);
my $mail = $Msg->make_convertable;
$mail->replace_in_header('to', '(e-mail address removed)');
$mail->send('sendmail');
}
Thanks