PugSA has asked for the wisdom of the Perl Monks concerning the following question:
Hi All
I've been trying to bounce mails from a Linux mailbox to a my outlook mail. Is there anything I need to setup on the mail for it to send as my code is not working I've set the mailhost in /etc/hosts
#!/usr/bin/perl use FindBin; use Mail::Box::Manager; my $scriptdir = $FindBin::Bin; my $mailspool = "/var/spool/mail/servicedesk"; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open(folder => "$mailspool", access => 'rw'); #my $msg = $folder->message(0); # $msg is a Mail::Message now # The message's subject foreach $msg ($folder->messages) { my $subject = $msg->subject; print "$subject\n"; $msg->bounce(To => "mymail@piet.co.za")->send or print "Failed +\n"; } ~
Thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail Bounce
by pemungkah (Priest) on Aug 20, 2010 at 20:13 UTC | |
|
Re: Mail Bounce
by Anonymous Monk on Aug 20, 2010 at 20:17 UTC |