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
In reply to Mail Bounce by PugSA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |