Hi,
I'm unable to reproduce the issue :-/
Here is my output (see versions)
Connecting to smtp.gmail.com using tls with LOGIN and timeout of 60
Net::SMTPS>>> Net::SMTPS(0.04)
Net::SMTPS>>> IO::Socket::INET6(2.72)
Net::SMTPS>>> IO::Socket(1.36)
Net::SMTPS>>> IO::Handle(1.34)
Net::SMTPS>>> Exporter(5.70)
Net::SMTPS>>> Net::SMTP(3.02)
Net::SMTPS>>> Net::Cmd(3.02)
Net::SMTPS>>> IO::Socket::IP(0.32)
Net::SMTPS=GLOB(0x2bee6c8)<<< 220 mx.google.com ESMTP ai11sm12345676wid.7 - gsmtp
There are minor differences (IO::Socket, IO::Handle, Exporter) but I think the issue is related to IO::Socket, which is unable to create the socket over the network.
1) Please, check your system is able to connect to smtp.google.com on 465.
Show quoted text> telnet smtp.gmail.com 465
Trying 74.125.206.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP t9sm22108914wjf.41 - gsmtp
2) Use another layer (see -layer=>'ssl')
my ($email,$error)=Email::Send::SMTP::Gmail->new(-debug=>1,verbose=>1,-smtp=>'smtp.gmail.com',-login=>'LOGIN',-pass=>'PASS',-layer=>'ssl');
3) Force another port (see -port=>'25')
my ($email,$error)=Email::Send::SMTP::Gmail->new(-debug=>1,verbose=>1,-smtp=>'smtp.gmail.com',-login=>'LOGIN',-pass=>'PASS',-port=>'25');
Regards,
Peco
On Mon Nov 10 00:02:36 2014, itzik.yarhi@gmail.com wrote:
Show quoted text> Hi Juan.
>
> Thanks a lot.
>
> It seems the latest of Net:SMTP is now 3.02.
>
> Here is output:
>
> C:\itzik\visitors>perl send2.pl
> Connecting to smtp.gmail.com using tls with LOGIN and timeout of 60
> Net::SMTPS>>> Net::SMTPS(0.04)
> Net::SMTPS>>> IO::Socket::INET6(2.72)
> Net::SMTPS>>> IO::Socket(1.37)
> Net::SMTPS>>> IO::Handle(1.35)
> Net::SMTPS>>> Exporter(5.71)
> Net::SMTPS>>> Net::SMTP(3.02)
> Net::SMTPS>>> Net::Cmd(3.02)
> Net::SMTPS>>> IO::Socket::IP(0.32)
> readline() on unopened filehandle GEN0 at
> C:/itzik/Strawberry/perl/lib/Net/Cmd.p
> m line 371.
> Can't call method "message" on an undefined value at
> C:/itzik/Strawberry/perl/si
> te/lib/Email/Send/SMTP/Gmail.pm line 91.
>
>
>
> תודה
>
> המשך יום נעים
>
> ---
> itzik yarhi
>
> On Sun, Nov 9, 2014 at 11:45 AM, Juan Jose San Martin via RT <
> bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote:
>
> > <URL:
https://rt.cpan.org/Ticket/Display.html?id=100214 >
> >
> > Hi,
> >
> > I'm testing with the latest SMTP.pm version (2.31) without errors.
> > Please, try the next simple code and let me know.
> >
> > ###########
> > use strict;
> > use warnings;
> >
> > my ($email,$error) =
> > Email::Send::SMTP::Gmail->new(-debug=>1,verbose=>1,-smtp=>'smtp.gmail.com
> > ',-login=>'LOGIN',-pass=>'PASS');
> >
> > if($email==-1){
> > print "Error: $error\n";
> > exit;
> > }
> > else{
> > print "\n\n\tBANNER: $email->banner()\n\n";
> > }
> >
> > ###############
> >
> > On Sat Nov 08 18:12:19 2014, itzik.yarhi@gmail.com wrote:
> > > Hi.
> > >
> > > I cannot run Email::Send::SMTP::Gmail as I get the following error:
> > > Can't call method "message" on an undefined value at
> > > C:/itzik/Strawberry/perl/si
> > > te/lib/Email/Send/SMTP/Gmail.pm line 91.
> > >
> > > Please advice
> > >
> > > I am using fresh installation of Strawberry Perl 5.20.
> > > I used its CPAN tool to retrieve all packages needed.
> > > It seems that Net::SMTP was modified, obsoleting 'message' method.
> > >
> > > Please help
> > >
> > > BTW, the example code fails to run on restricted with the var '$email'
> > > not-exist.
> > > (It should be $mail var everywhere at the example)
> > >
> > > Thanks a lot
> > >
> > > ---
> > > itzik yarhi
> >
> >
> >
> >