biohisham has asked for the wisdom of the Perl Monks concerning the following question:
Whereas setting the SSL connectivity to true instead would make the program work just fine... It is not immediately clear to me why -1 is returned in the first case, I have configured POP settings and support including the port numbers as per instructions from Gmail. An explanation of this behavior is what I am curious to find out about...you have -1 new Message(s)
use strict; use warnings; use Mail::POP3Client; my $userName = 'name@gmail.com'; my $password = 'password'; my $mail = new Mail::POP3Client( USER =>$userName, PASSWORD=>$password, HOST =>"pop.gmail.com", #PORT=> 995, #returns -1, not working USESSL =>'true' #changes the port# to 995,working. ); #checking for messages: if($mail->Count){ print "you have @{[$mail->Count]} new Message(s)\n"; print "saving Message(s) to file\n"; open(FileHandle, '>',"gmailMails.txt")or die("$!\n"); for(my $index =1;$index<=$mail->Count;$index++){ print FileHandle $mail->HeadAndBody($index +); } close FileHandle; }
My other pending issue is with the module Mail::Mailer, since it is based on the 'sendmail' *nix program what alternatives are there for me on Win systems so that I can send emails through, I'm considering Mail::Sender, what do you advice me of?...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail::POP3Client USESSL=> and PORT=>
by almut (Canon) on Dec 22, 2009 at 22:12 UTC | |
by Anonymous Monk on Dec 24, 2009 at 14:33 UTC | |
|
Re: Mail::POP3Client USESSL=> and PORT=>
by gmargo (Hermit) on Dec 22, 2009 at 22:06 UTC |