N
Nils M. Lunde
Hi!
I'm trying to do the following:
-Extract an Email from a mailbox using grepmail
-Bounce this Email to a different address
I thought that this would be an easy thing to do, but I still haven't manage
to do it the way I want to.
The problem is MIME encoded messages.
I've tried several approches, but I always get the same result: the Email
Content-type is always text/plain after I've sent it.
It seems like some of the header is stripped off.
Here is my code:
##########################################
....
use MIME:
arser;
use MIME::Entity;
use MIME::Head;
my $sCmd = "grepmail -iu -Y \'(\^From
\' $sMyAddress $sPathToMailbox;
my @EmailLines = `$sCmd`;
my $oParser = new MIME:
arser;
my $oEmail = $oParser->parse_data(\@EmailLines);
$oEmail->head->replace("To", $sBounceAddress);
my $sRes = $oEmail->smtpsend;
....
##########################################
Does anyone have a suggestion on how I can forward the mail without
stripping the header?
Thanx in advance!
-Nils Magne Lunde
I'm trying to do the following:
-Extract an Email from a mailbox using grepmail
-Bounce this Email to a different address
I thought that this would be an easy thing to do, but I still haven't manage
to do it the way I want to.
The problem is MIME encoded messages.
I've tried several approches, but I always get the same result: the Email
Content-type is always text/plain after I've sent it.
It seems like some of the header is stripped off.
Here is my code:
##########################################
....
use MIME:
use MIME::Entity;
use MIME::Head;
my $sCmd = "grepmail -iu -Y \'(\^From
my @EmailLines = `$sCmd`;
my $oParser = new MIME:
my $oEmail = $oParser->parse_data(\@EmailLines);
$oEmail->head->replace("To", $sBounceAddress);
my $sRes = $oEmail->smtpsend;
....
##########################################
Does anyone have a suggestion on how I can forward the mail without
stripping the header?
Thanx in advance!
-Nils Magne Lunde