Any ideas?... Net::SMTP=GLOB(0x16e2b34)>>> right" Net::SMTP=GLOB(0x16e2b34)>>> >r</span><BR> Net::SMTP=GLOB(0x16e2b34)>>> </DIV></BODY></HTML> Net::SMTP=GLOB(0x16e2b34)>>> ------=_NextPart_000_0001_01C65387.769711 +20-- Net::SMTP=GLOB(0x16e2b34)>>> . Net::SMTP: Unexpected EOF on command channel at C:\perl\forwarder.pl l +ine 29
#!perl use Net::POP3; use Net::SMTP; my $ServerName = "pop.server"; my $pop3 = Net::POP3->new($ServerName, Debug => 0); #redirect err open STDERR, ">>C:\\mail.log"; my $UserName = "username"; my $Password = "password"; my $msg_id; my $smtp = Net::SMTP->new('smtp.server', Debug => 1); die "Couldn't log on to server" unless $pop3; my $Num_Messages = $pop3->login($UserName, $Password); my $Messages = $pop3->list(); for $msg_id (keys(%$Messages)) { my $MsgContent = $pop3->get($msg_id); $smtp->mail('from@me.com'); $smtp->to('forward@address.com'); $smtp->data(); for (@$MsgContent) { $smtp->datasend($_); } $smtp->dataend(); my $delete_msg = $pop3->delete($msg_id); close OUT; } $smtp->quit(); $pop3->quit();
In reply to What's wrong with my forwarder? by Jobby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |