Skip Menu |

This queue is for tickets about the Email-Send-SMTP-Gmail CPAN distribution.

Report information
The Basics
Id: 125887
Status: resolved
Priority: 0/
Queue: Email-Send-SMTP-Gmail

People
Owner: Nobody in particular
Requestors: sanjay [...] banerji.in
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Atul Magdum <amagdum [...] identlogic.com>
Subject: Email::Send::SMTP::Gmail error
Date: Thu, 19 Jul 2018 16:36:43 +0530
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Sanjay Banerji <sanjay [...] banerji.in>
Get error: Can't locate object method "send" via package "-1" (perhaps you forgot to load "-1"?) at C:\Temp\email-test\e3.pl line 12. session error: Invalid argument Line 12 in red below. Windows 10 environment. Script as in documentation with email and password changes and attachment removed: use strict; use warnings; use Email::Send::SMTP::Gmail; my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', -login=>'amagdum@identlogic.com', -pass=>'XXX'); print "session error: $error" unless ($mail!=-1); $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just testing it'); $mail->bye; Both sender & receiver are google hosted emails.
Hello, It seems that you are missing some library o dependency. Please, activate the Debug option so get more information. my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', -login=>'amagdum@identlogic.com', -pass=>'XXX', -debug=>'1'); Thanks, Peco On Thu Jul 19 07:07:15 2018, sanjay@banerji.in wrote: Show quoted text
> Get error: > > Can't locate object method "send" via package "-1" (perhaps you forgot > to load "-1"?) at C:\Temp\email-test\e3.pl line 12. > session error: Invalid argument > > Line 12 in red below. > > Windows 10 environment. > > Script as in documentation with email and password changes and > attachment removed: > > use strict; > use warnings; > > use Email::Send::SMTP::Gmail; > > my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', > -login=>'amagdum@identlogic.com', > -pass=>'XXX'); > > print "session error: $error" unless ($mail!=-1); > > $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just > testing it'); > > $mail->bye; > > Both sender & receiver are google hosted emails. > >
CC: Atul Magdum <amagdum [...] identlogic.com>
Subject: Re: [rt.cpan.org #125887] Email::Send::SMTP::Gmail error
Date: Thu, 19 Jul 2018 17:37:57 +0530
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Sanjay Banerji <sanjay [...] banerji.in>
Thank you Peco for the prompt reply.  The error is now: Connecting to smtp.gmail.com using tls with LOGIN on port 25 and timeout of 60 Could not connect to SMTP server Can't locate object method "send" via package "-1" (perhaps you forgot to load "-1"?) at C:\Temp\email-test\e3.pl line 13. session error: Invalid argument Windows 10, ActiveState Perl 5.24 - both 64 bit.  The script is now: use strict; use warnings; use Email::Send::SMTP::Gmail; my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', -login=>'amagdum@identlogic.com',                                                  -pass=>'XXX',                                                  -debug=>'1'); print "session error: $error" unless ($mail!=-1); $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just testing it'); $mail->bye; Regards Sanjay On 19/07/2018 17:29, Juan Jose San Martin via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=125887 > > > Hello, > > It seems that you are missing some library o dependency. > > Please, activate the Debug option so get more information. > > my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', > -login=>'amagdum@identlogic.com', > -pass=>'XXX', > -debug=>'1'); > > Thanks, > Peco > > On Thu Jul 19 07:07:15 2018, sanjay@banerji.in wrote:
>> Get error: >> >> Can't locate object method "send" via package "-1" (perhaps you forgot >> to load "-1"?) at C:\Temp\email-test\e3.pl line 12. >> session error: Invalid argument >> >> Line 12 in red below. >> >> Windows 10 environment. >> >> Script as in documentation with email and password changes and >> attachment removed: >> >> use strict; >> use warnings; >> >> use Email::Send::SMTP::Gmail; >> >> my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', >> -login=>'amagdum@identlogic.com', >> -pass=>'XXX'); >> >> print "session error: $error" unless ($mail!=-1); >> >> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just >> testing it'); >> >> $mail->bye; >> >> Both sender & receiver are google hosted emails. >> >>
> >
CC: Atul Magdum <amagdum [...] identlogic.com>
Subject: Re: [rt.cpan.org #125887] Email::Send::SMTP::Gmail error
Date: Thu, 19 Jul 2018 17:43:55 +0530
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Sanjay Banerji <sanjay [...] banerji.in>
Thank you Peco for the prompt reply.  The error is below.  Pinging smtp.gmail.com works: Connecting to smtp.gmail.com using tls with LOGIN on port 25 and timeout of 60 Could not connect to SMTP server Can't locate object method "send" via package "-1" (perhaps you forgot to load "-1"?) at C:\Temp\email-test\e3.pl line 13. session error: Invalid argument C:\Temp\email-test>ping smtp.gmail.com Pinging gmail-smtp-msa.l.google.com [74.125.200.108] with 32 bytes of data: Reply from 74.125.200.108: bytes=32 time=93ms TTL=40 Reply from 74.125.200.108: bytes=32 time=90ms TTL=40 Windows 10, ActiveState Perl 5.24 - both 64 bit.  The script is now: use strict; use warnings; use Email::Send::SMTP::Gmail; my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com',                                                  -login=>'amagdum@identlogic.com',                                                  -pass=>'XXX',                                                  -debug=>'1'); print "session error: $error" unless ($mail!=-1); $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just testing it'); $mail->bye; Regards Sanjay On 19/07/2018 17:29, Juan Jose San Martin via RT wrote: Show quoted text
> <URL:https://rt.cpan.org/Ticket/Display.html?id=125887 > > > Hello, > > It seems that you are missing some library o dependency. > > Please, activate the Debug option so get more information. > > my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', > -login=>'amagdum@identlogic.com', > -pass=>'XXX', > -debug=>'1'); > > Thanks, > Peco > > On Thu Jul 19 07:07:15 2018,sanjay@banerji.in wrote:
>> Get error: >> >> Can't locate object method "send" via package "-1" (perhaps you forgot >> to load "-1"?) at C:\Temp\email-test\e3.pl line 12. >> session error: Invalid argument >> >> Line 12 in red below. >> >> Windows 10 environment. >> >> Script as in documentation with email and password changes and >> attachment removed: >> >> use strict; >> use warnings; >> >> use Email::Send::SMTP::Gmail; >> >> my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', >> -login=>'amagdum@identlogic.com', >> -pass=>'XXX'); >> >> print "session error: $error" unless ($mail!=-1); >> >> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just >> testing it'); >> >> $mail->bye; >> >> Both sender & receiver are google hosted emails. >> >>
>
CC: Atul Magdum <amagdum [...] identlogic.com>
Subject: Re: [rt.cpan.org #125887] Email::Send::SMTP::Gmail error
Date: Thu, 19 Jul 2018 19:01:58 +0530
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Sanjay Banerji <sanjay [...] banerji.in>
I opened Port 25 for both inbound & outbound traffic on my Windows machine.  Same problem. Email to and form these emails working OK when using Thunderbird. Sanjay On 19/07/2018 17:43, Sanjay Banerji wrote: Show quoted text
> Thank you Peco for the prompt reply.  The error is below.  Pinging > smtp.gmail.com works: > > Connecting to smtp.gmail.com using tls with LOGIN on port 25 and > timeout of 60 > Could not connect to SMTP server > Can't locate object method "send" via package "-1" (perhaps you forgot > to load "-1"?) at C:\Temp\email-test\e3.pl line 13. > session error: Invalid argument > C:\Temp\email-test>ping smtp.gmail.com > > Pinging gmail-smtp-msa.l.google.com [74.125.200.108] with 32 bytes of > data: > Reply from 74.125.200.108: bytes=32 time=93ms TTL=40 > Reply from 74.125.200.108: bytes=32 time=90ms TTL=40 > > Windows 10, ActiveState Perl 5.24 - both 64 bit.  The script is now: > > use strict; > use warnings; > > use Email::Send::SMTP::Gmail; > > my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', >                                                  > -login=>'amagdum@identlogic.com', > -pass=>'XXX', > -debug=>'1'); > > print "session error: $error" unless ($mail!=-1); > > $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just > testing it'); > > $mail->bye; > > > Regards > > Sanjay > > > > > > > On 19/07/2018 17:29, Juan Jose San Martin via RT wrote:
>> <URL:https://rt.cpan.org/Ticket/Display.html?id=125887 > >> >> Hello, >> >> It seems that you are missing some library o dependency. >> >> Please, activate the Debug option so get more information. >> >> my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', >> -login=>'amagdum@identlogic.com', >> -pass=>'XXX', >> -debug=>'1'); >> >> Thanks, >> Peco >> >> On Thu Jul 19 07:07:15 2018,sanjay@banerji.in wrote:
>>> Get error: >>> >>> Can't locate object method "send" via package "-1" (perhaps you forgot >>> to load "-1"?) at C:\Temp\email-test\e3.pl line 12. >>> session error: Invalid argument >>> >>> Line 12 in red below. >>> >>> Windows 10 environment. >>> >>> Script as in documentation with email and password changes and >>> attachment removed: >>> >>> use strict; >>> use warnings; >>> >>> use Email::Send::SMTP::Gmail; >>> >>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', >>> -login=>'amagdum@identlogic.com', >>> -pass=>'XXX'); >>> >>> print "session error: $error" unless ($mail!=-1); >>> >>> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just >>> testing it'); >>> >>> $mail->bye; >>> >>> Both sender & receiver are google hosted emails. >>> >>>
>
Hello, Please try: telnet smtp.gmail.com 25 Other option, try other port (587, as Thunderbird) Thanks Peco On Thu Jul 19 09:32:10 2018, sanjay@banerji.in wrote: Show quoted text
> I opened Port 25 for both inbound & outbound traffic on my Windows > machine.  Same problem. > > Email to and form these emails working OK when using Thunderbird. > > Sanjay > > > On 19/07/2018 17:43, Sanjay Banerji wrote:
> > Thank you Peco for the prompt reply.  The error is below.  Pinging > > smtp.gmail.com works: > > > > Connecting to smtp.gmail.com using tls with LOGIN on port 25 and > > timeout of 60 > > Could not connect to SMTP server > > Can't locate object method "send" via package "-1" (perhaps you > > forgot > > to load "-1"?) at C:\Temp\email-test\e3.pl line 13. > > session error: Invalid argument > > C:\Temp\email-test>ping smtp.gmail.com > > > > Pinging gmail-smtp-msa.l.google.com [74.125.200.108] with 32 bytes of > > data: > > Reply from 74.125.200.108: bytes=32 time=93ms TTL=40 > > Reply from 74.125.200.108: bytes=32 time=90ms TTL=40 > > > > Windows 10, ActiveState Perl 5.24 - both 64 bit.  The script is now: > > > > use strict; > > use warnings; > > > > use Email::Send::SMTP::Gmail; > > > > my ($mail,$error)=Email::Send::SMTP::Gmail->new( > > -smtp=>'smtp.gmail.com', > > > > -login=>'amagdum@identlogic.com', > > -pass=>'XXX', > > -debug=>'1'); > > > > print "session error: $error" unless ($mail!=-1); > > > > $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', > > -body=>'Just > > testing it'); > > > > $mail->bye; > > > > > > Regards > > > > Sanjay > > > > > > > > > > > > > > On 19/07/2018 17:29, Juan Jose San Martin via RT wrote:
> >> <URL:https://rt.cpan.org/Ticket/Display.html?id=125887 > > >> > >> Hello, > >> > >> It seems that you are missing some library o dependency. > >> > >> Please, activate the Debug option so get more information. > >> > >> my ($mail,$error)=Email::Send::SMTP::Gmail->new( > >> -smtp=>'smtp.gmail.com', > >> -login=>'amagdum@identlogic.com', > >> -pass=>'XXX', > >> -debug=>'1'); > >> > >> Thanks, > >> Peco > >> > >> On Thu Jul 19 07:07:15 2018,sanjay@banerji.in wrote:
> >>> Get error: > >>> > >>> Can't locate object method "send" via package "-1" (perhaps you > >>> forgot > >>> to load "-1"?) at C:\Temp\email-test\e3.pl line 12. > >>> session error: Invalid argument > >>> > >>> Line 12 in red below. > >>> > >>> Windows 10 environment. > >>> > >>> Script as in documentation with email and password changes and > >>> attachment removed: > >>> > >>> use strict; > >>> use warnings; > >>> > >>> use Email::Send::SMTP::Gmail; > >>> > >>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( > >>> -smtp=>'smtp.gmail.com', > >>> -login=>'amagdum@identlogic.com', > >>> -pass=>'XXX'); > >>> > >>> print "session error: $error" unless ($mail!=-1); > >>> > >>> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', > >>> -body=>'Just > >>> testing it'); > >>> > >>> $mail->bye; > >>> > >>> Both sender & receiver are google hosted emails. > >>> > >>>
> >
CC: Atul Magdum <amagdum [...] identlogic.com>
Subject: Re: [rt.cpan.org #125887] Email::Send::SMTP::Gmail error
Date: Fri, 20 Jul 2018 14:45:17 +0530
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Sanjay Banerji <sanjay [...] banerji.in>
1.  telnet smtp.gmail.com 25 - does not work - Windows & Linux. Seems Google has changed things.  I had contacted them before contacting you - no response as yet. 2.  After changing to 587, the response is C:\Temp>cd email-test C:\Temp\email-test>e3.pl Connecting to smtp.gmail.com using tls with LOGIN on port 587 and timeout of 60 Net::SMTPS>>> Net::SMTPS(0.06) Net::SMTPS>>>   IO::Socket::IP(0.39) Net::SMTPS>>>     IO::Socket(1.38) Net::SMTPS>>>       IO::Handle(1.36) Net::SMTPS>>>         Exporter(5.72) Net::SMTPS>>>   Net::SMTP(3.10) Net::SMTPS>>>     Net::Cmd(3.10) Net::SMTPS=GLOB(0x6514d8)<<< 220 smtp.gmail.com ESMTP r87-v6sm2019947pfb.1 - gsmtp Net::SMTPS=GLOB(0x6514d8)>>> EHLO localhost.localdomain Net::SMTPS=GLOB(0x6514d8)<<< 250-smtp.gmail.com at your service, [49.36.1.31] Net::SMTPS=GLOB(0x6514d8)<<< 250-SIZE 35882577 Net::SMTPS=GLOB(0x6514d8)<<< 250-8BITMIME Net::SMTPS=GLOB(0x6514d8)<<< 250-STARTTLS Net::SMTPS=GLOB(0x6514d8)<<< 250-ENHANCEDSTATUSCODES Net::SMTPS=GLOB(0x6514d8)<<< 250-PIPELINING Net::SMTPS=GLOB(0x6514d8)<<< 250-CHUNKING Net::SMTPS=GLOB(0x6514d8)<<< 250 SMTPUTF8 Net::SMTPS=GLOB(0x6514d8)>>> my favorite: LOGIN Authentication (SMTP) failed Can't locate object method "send" via package "-1" (perhaps you forgot to load "-1"?) at C:\Temp\email-test\e3.pl line 14. session error: Command unknown: 'AUTH' C:\Temp\email-test> The current Perl script is: use strict; use warnings; use Email::Send::SMTP::Gmail; my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', -port=>'587', -login=>'amagdum@identlogic.com', -pass=>'XXX', -debug=>'1'); print "session error: $error" unless ($mail!=-1); $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just testing it'); $mail->bye; Thanks for your prompt replies. Sanjay Banerji P.S.  May I humbly request you to try this script with your own gmail email & suggest improvements.  Of course, only if convenient for you.  After all, this would be a fundamental problem for all users of this module.  Thanks.  Sanjay On 19/07/2018 19:20, Juan Jose San Martin via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=125887 > > > Hello, > > Please try: telnet smtp.gmail.com 25 > > Other option, try other port (587, as Thunderbird) > > Thanks > Peco > > On Thu Jul 19 09:32:10 2018, sanjay@banerji.in wrote:
>> I opened Port 25 for both inbound & outbound traffic on my Windows >> machine.  Same problem. >> >> Email to and form these emails working OK when using Thunderbird. >> >> Sanjay >> >> >> On 19/07/2018 17:43, Sanjay Banerji wrote:
>>> Thank you Peco for the prompt reply.  The error is below.  Pinging >>> smtp.gmail.com works: >>> >>> Connecting to smtp.gmail.com using tls with LOGIN on port 25 and >>> timeout of 60 >>> Could not connect to SMTP server >>> Can't locate object method "send" via package "-1" (perhaps you >>> forgot >>> to load "-1"?) at C:\Temp\email-test\e3.pl line 13. >>> session error: Invalid argument >>> C:\Temp\email-test>ping smtp.gmail.com >>> >>> Pinging gmail-smtp-msa.l.google.com [74.125.200.108] with 32 bytes of >>> data: >>> Reply from 74.125.200.108: bytes=32 time=93ms TTL=40 >>> Reply from 74.125.200.108: bytes=32 time=90ms TTL=40 >>> >>> Windows 10, ActiveState Perl 5.24 - both 64 bit.  The script is now: >>> >>> use strict; >>> use warnings; >>> >>> use Email::Send::SMTP::Gmail; >>> >>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( >>> -smtp=>'smtp.gmail.com', >>> >>> -login=>'amagdum@identlogic.com', >>> -pass=>'XXX', >>> -debug=>'1'); >>> >>> print "session error: $error" unless ($mail!=-1); >>> >>> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', >>> -body=>'Just >>> testing it'); >>> >>> $mail->bye; >>> >>> >>> Regards >>> >>> Sanjay >>> >>> >>> >>> >>> >>> >>> On 19/07/2018 17:29, Juan Jose San Martin via RT wrote:
>>>> <URL:https://rt.cpan.org/Ticket/Display.html?id=125887 > >>>> >>>> Hello, >>>> >>>> It seems that you are missing some library o dependency. >>>> >>>> Please, activate the Debug option so get more information. >>>> >>>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( >>>> -smtp=>'smtp.gmail.com', >>>> -login=>'amagdum@identlogic.com', >>>> -pass=>'XXX', >>>> -debug=>'1'); >>>> >>>> Thanks, >>>> Peco >>>> >>>> On Thu Jul 19 07:07:15 2018,sanjay@banerji.in wrote:
>>>>> Get error: >>>>> >>>>> Can't locate object method "send" via package "-1" (perhaps you >>>>> forgot >>>>> to load "-1"?) at C:\Temp\email-test\e3.pl line 12. >>>>> session error: Invalid argument >>>>> >>>>> Line 12 in red below. >>>>> >>>>> Windows 10 environment. >>>>> >>>>> Script as in documentation with email and password changes and >>>>> attachment removed: >>>>> >>>>> use strict; >>>>> use warnings; >>>>> >>>>> use Email::Send::SMTP::Gmail; >>>>> >>>>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( >>>>> -smtp=>'smtp.gmail.com', >>>>> -login=>'amagdum@identlogic.com', >>>>> -pass=>'XXX'); >>>>> >>>>> print "session error: $error" unless ($mail!=-1); >>>>> >>>>> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', >>>>> -body=>'Just >>>>> testing it'); >>>>> >>>>> $mail->bye; >>>>> >>>>> Both sender & receiver are google hosted emails. >>>>> >>>>>
> >
Hello, I have tested your script and it works from my side! Please, check your Gmail account (amagdum@identlogic.com) is able to send emails using standard SMTP (with SSL/TLS support). Bye default, Google doesn't allow it. https://support.google.com/a/answer/6260879?hl=en Thanks, Peco On Fri Jul 20 05:15:32 2018, sanjay@banerji.in wrote: Show quoted text
> 1.  telnet smtp.gmail.com 25 - does not work - Windows & Linux. Seems > Google has changed things.  I had contacted them before contacting you - > no response as yet. > > 2.  After changing to 587, the response is > > C:\Temp>cd email-test > > C:\Temp\email-test>e3.pl > Connecting to smtp.gmail.com using tls with LOGIN on port 587 and > timeout of 60 > Net::SMTPS>>> Net::SMTPS(0.06) > Net::SMTPS>>>   IO::Socket::IP(0.39) > Net::SMTPS>>>     IO::Socket(1.38) > Net::SMTPS>>>       IO::Handle(1.36) > Net::SMTPS>>>         Exporter(5.72) > Net::SMTPS>>>   Net::SMTP(3.10) > Net::SMTPS>>>     Net::Cmd(3.10) > Net::SMTPS=GLOB(0x6514d8)<<< 220 smtp.gmail.com ESMTP > r87-v6sm2019947pfb.1 - gsmtp > Net::SMTPS=GLOB(0x6514d8)>>> EHLO localhost.localdomain > Net::SMTPS=GLOB(0x6514d8)<<< 250-smtp.gmail.com at your service, > [49.36.1.31] > Net::SMTPS=GLOB(0x6514d8)<<< 250-SIZE 35882577 > Net::SMTPS=GLOB(0x6514d8)<<< 250-8BITMIME > Net::SMTPS=GLOB(0x6514d8)<<< 250-STARTTLS > Net::SMTPS=GLOB(0x6514d8)<<< 250-ENHANCEDSTATUSCODES > Net::SMTPS=GLOB(0x6514d8)<<< 250-PIPELINING > Net::SMTPS=GLOB(0x6514d8)<<< 250-CHUNKING > Net::SMTPS=GLOB(0x6514d8)<<< 250 SMTPUTF8 > Net::SMTPS=GLOB(0x6514d8)>>> my favorite: LOGIN > Authentication (SMTP) failed > Can't locate object method "send" via package "-1" (perhaps you forgot > to load "-1"?) at C:\Temp\email-test\e3.pl line 14. > session error: Command unknown: 'AUTH' > C:\Temp\email-test> > > The current Perl script is: > > use strict; > use warnings; > > use Email::Send::SMTP::Gmail; > > my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', > -port=>'587', > -login=>'amagdum@identlogic.com', > -pass=>'XXX', > -debug=>'1'); > > print "session error: $error" unless ($mail!=-1); > > $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', -body=>'Just > testing it'); > > $mail->bye; > > > Thanks for your prompt replies. > > Sanjay Banerji > > P.S.  May I humbly request you to try this script with your own gmail > email & suggest improvements.  Of course, only if convenient for you.  > After all, this would be a fundamental problem for all users of this > module.  Thanks.  Sanjay > > > On 19/07/2018 19:20, Juan Jose San Martin via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=125887 > > > > > Hello, > > > > Please try: telnet smtp.gmail.com 25 > > > > Other option, try other port (587, as Thunderbird) > > > > Thanks > > Peco > > > > On Thu Jul 19 09:32:10 2018, sanjay@banerji.in wrote:
> >> I opened Port 25 for both inbound & outbound traffic on my Windows > >> machine.  Same problem. > >> > >> Email to and form these emails working OK when using Thunderbird. > >> > >> Sanjay > >> > >> > >> On 19/07/2018 17:43, Sanjay Banerji wrote:
> >>> Thank you Peco for the prompt reply.  The error is below.  Pinging > >>> smtp.gmail.com works: > >>> > >>> Connecting to smtp.gmail.com using tls with LOGIN on port 25 and > >>> timeout of 60 > >>> Could not connect to SMTP server > >>> Can't locate object method "send" via package "-1" (perhaps you > >>> forgot > >>> to load "-1"?) at C:\Temp\email-test\e3.pl line 13. > >>> session error: Invalid argument > >>> C:\Temp\email-test>ping smtp.gmail.com > >>> > >>> Pinging gmail-smtp-msa.l.google.com [74.125.200.108] with 32 bytes of > >>> data: > >>> Reply from 74.125.200.108: bytes=32 time=93ms TTL=40 > >>> Reply from 74.125.200.108: bytes=32 time=90ms TTL=40 > >>> > >>> Windows 10, ActiveState Perl 5.24 - both 64 bit.  The script is now: > >>> > >>> use strict; > >>> use warnings; > >>> > >>> use Email::Send::SMTP::Gmail; > >>> > >>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( > >>> -smtp=>'smtp.gmail.com', > >>> > >>> -login=>'amagdum@identlogic.com', > >>> -pass=>'XXX', > >>> -debug=>'1'); > >>> > >>> print "session error: $error" unless ($mail!=-1); > >>> > >>> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', > >>> -body=>'Just > >>> testing it'); > >>> > >>> $mail->bye; > >>> > >>> > >>> Regards > >>> > >>> Sanjay > >>> > >>> > >>> > >>> > >>> > >>> > >>> On 19/07/2018 17:29, Juan Jose San Martin via RT wrote:
> >>>> <URL:https://rt.cpan.org/Ticket/Display.html?id=125887 > > >>>> > >>>> Hello, > >>>> > >>>> It seems that you are missing some library o dependency. > >>>> > >>>> Please, activate the Debug option so get more information. > >>>> > >>>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( > >>>> -smtp=>'smtp.gmail.com', > >>>> -login=>'amagdum@identlogic.com', > >>>> -pass=>'XXX', > >>>> -debug=>'1'); > >>>> > >>>> Thanks, > >>>> Peco > >>>> > >>>> On Thu Jul 19 07:07:15 2018,sanjay@banerji.in wrote:
> >>>>> Get error: > >>>>> > >>>>> Can't locate object method "send" via package "-1" (perhaps you > >>>>> forgot > >>>>> to load "-1"?) at C:\Temp\email-test\e3.pl line 12. > >>>>> session error: Invalid argument > >>>>> > >>>>> Line 12 in red below. > >>>>> > >>>>> Windows 10 environment. > >>>>> > >>>>> Script as in documentation with email and password changes and > >>>>> attachment removed: > >>>>> > >>>>> use strict; > >>>>> use warnings; > >>>>> > >>>>> use Email::Send::SMTP::Gmail; > >>>>> > >>>>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( > >>>>> -smtp=>'smtp.gmail.com', > >>>>> -login=>'amagdum@identlogic.com', > >>>>> -pass=>'XXX'); > >>>>> > >>>>> print "session error: $error" unless ($mail!=-1); > >>>>> > >>>>> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', > >>>>> -body=>'Just > >>>>> testing it'); > >>>>> > >>>>> $mail->bye; > >>>>> > >>>>> Both sender & receiver are google hosted emails. > >>>>> > >>>>>
> > > >
Google's SMTP server has its own authentication protocol and calls the standard indicated in the RFC unsafe. https://www.ietf.org/rfc/rfc3207.txt For everything to work, you need to go to gmail account settings to allow access for less secure apps. https://support.google.com/accounts/answer/6010255 On Fri Jul 20 05:34:51 2018, PECO wrote: Show quoted text
> Hello, > > I have tested your script and it works from my side! > > Please, check your Gmail account (amagdum@identlogic.com) is able to > send emails using standard SMTP (with SSL/TLS support). Bye default, > Google doesn't allow it. > > https://support.google.com/a/answer/6260879?hl=en > > Thanks, > Peco > > On Fri Jul 20 05:15:32 2018, sanjay@banerji.in wrote:
> > 1.  telnet smtp.gmail.com 25 - does not work - Windows & Linux. Seems > > Google has changed things.  I had contacted them before contacting > > you - > > no response as yet. > > > > 2.  After changing to 587, the response is > > > > C:\Temp>cd email-test > > > > C:\Temp\email-test>e3.pl > > Connecting to smtp.gmail.com using tls with LOGIN on port 587 and > > timeout of 60 > > Net::SMTPS>>> Net::SMTPS(0.06) > > Net::SMTPS>>>   IO::Socket::IP(0.39) > > Net::SMTPS>>>     IO::Socket(1.38) > > Net::SMTPS>>>       IO::Handle(1.36) > > Net::SMTPS>>>         Exporter(5.72) > > Net::SMTPS>>>   Net::SMTP(3.10) > > Net::SMTPS>>>     Net::Cmd(3.10) > > Net::SMTPS=GLOB(0x6514d8)<<< 220 smtp.gmail.com ESMTP > > r87-v6sm2019947pfb.1 - gsmtp > > Net::SMTPS=GLOB(0x6514d8)>>> EHLO localhost.localdomain > > Net::SMTPS=GLOB(0x6514d8)<<< 250-smtp.gmail.com at your service, > > [49.36.1.31] > > Net::SMTPS=GLOB(0x6514d8)<<< 250-SIZE 35882577 > > Net::SMTPS=GLOB(0x6514d8)<<< 250-8BITMIME > > Net::SMTPS=GLOB(0x6514d8)<<< 250-STARTTLS > > Net::SMTPS=GLOB(0x6514d8)<<< 250-ENHANCEDSTATUSCODES > > Net::SMTPS=GLOB(0x6514d8)<<< 250-PIPELINING > > Net::SMTPS=GLOB(0x6514d8)<<< 250-CHUNKING > > Net::SMTPS=GLOB(0x6514d8)<<< 250 SMTPUTF8 > > Net::SMTPS=GLOB(0x6514d8)>>> my favorite: LOGIN > > Authentication (SMTP) failed > > Can't locate object method "send" via package "-1" (perhaps you > > forgot > > to load "-1"?) at C:\Temp\email-test\e3.pl line 14. > > session error: Command unknown: 'AUTH' > > C:\Temp\email-test> > > > > The current Perl script is: > > > > use strict; > > use warnings; > > > > use Email::Send::SMTP::Gmail; > > > > my ($mail,$error)=Email::Send::SMTP::Gmail->new( > > -smtp=>'smtp.gmail.com', > > -port=>'587', > > -login=>'amagdum@identlogic.com', > > -pass=>'XXX', > > -debug=>'1'); > > > > print "session error: $error" unless ($mail!=-1); > > > > $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', > > -body=>'Just > > testing it'); > > > > $mail->bye; > > > > > > Thanks for your prompt replies. > > > > Sanjay Banerji > > > > P.S.  May I humbly request you to try this script with your own gmail > > email & suggest improvements.  Of course, only if convenient for > > you. > > After all, this would be a fundamental problem for all users of this > > module.  Thanks.  Sanjay > > > > > > On 19/07/2018 19:20, Juan Jose San Martin via RT wrote:
> > > <URL: https://rt.cpan.org/Ticket/Display.html?id=125887 > > > > > > > Hello, > > > > > > Please try: telnet smtp.gmail.com 25 > > > > > > Other option, try other port (587, as Thunderbird) > > > > > > Thanks > > > Peco > > > > > > On Thu Jul 19 09:32:10 2018, sanjay@banerji.in wrote:
> > >> I opened Port 25 for both inbound & outbound traffic on my Windows > > >> machine.  Same problem. > > >> > > >> Email to and form these emails working OK when using Thunderbird. > > >> > > >> Sanjay > > >> > > >> > > >> On 19/07/2018 17:43, Sanjay Banerji wrote:
> > >>> Thank you Peco for the prompt reply.  The error is below.  > > >>> Pinging > > >>> smtp.gmail.com works: > > >>> > > >>> Connecting to smtp.gmail.com using tls with LOGIN on port 25 and > > >>> timeout of 60 > > >>> Could not connect to SMTP server > > >>> Can't locate object method "send" via package "-1" (perhaps you > > >>> forgot > > >>> to load "-1"?) at C:\Temp\email-test\e3.pl line 13. > > >>> session error: Invalid argument > > >>> C:\Temp\email-test>ping smtp.gmail.com > > >>> > > >>> Pinging gmail-smtp-msa.l.google.com [74.125.200.108] with 32 > > >>> bytes of > > >>> data: > > >>> Reply from 74.125.200.108: bytes=32 time=93ms TTL=40 > > >>> Reply from 74.125.200.108: bytes=32 time=90ms TTL=40 > > >>> > > >>> Windows 10, ActiveState Perl 5.24 - both 64 bit.  The script is > > >>> now: > > >>> > > >>> use strict; > > >>> use warnings; > > >>> > > >>> use Email::Send::SMTP::Gmail; > > >>> > > >>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( > > >>> -smtp=>'smtp.gmail.com', > > >>> > > >>> -login=>'amagdum@identlogic.com', > > >>> -pass=>'XXX', > > >>> -debug=>'1'); > > >>> > > >>> print "session error: $error" unless ($mail!=-1); > > >>> > > >>> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', > > >>> -body=>'Just > > >>> testing it'); > > >>> > > >>> $mail->bye; > > >>> > > >>> > > >>> Regards > > >>> > > >>> Sanjay > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> On 19/07/2018 17:29, Juan Jose San Martin via RT wrote:
> > >>>> <URL:https://rt.cpan.org/Ticket/Display.html?id=125887 > > > >>>> > > >>>> Hello, > > >>>> > > >>>> It seems that you are missing some library o dependency. > > >>>> > > >>>> Please, activate the Debug option so get more information. > > >>>> > > >>>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( > > >>>> -smtp=>'smtp.gmail.com', > > >>>> -login=>'amagdum@identlogic.com', > > >>>> -pass=>'XXX', > > >>>> -debug=>'1'); > > >>>> > > >>>> Thanks, > > >>>> Peco > > >>>> > > >>>> On Thu Jul 19 07:07:15 2018,sanjay@banerji.in wrote:
> > >>>>> Get error: > > >>>>> > > >>>>> Can't locate object method "send" via package "-1" (perhaps you > > >>>>> forgot > > >>>>> to load "-1"?) at C:\Temp\email-test\e3.pl line 12. > > >>>>> session error: Invalid argument > > >>>>> > > >>>>> Line 12 in red below. > > >>>>> > > >>>>> Windows 10 environment. > > >>>>> > > >>>>> Script as in documentation with email and password changes and > > >>>>> attachment removed: > > >>>>> > > >>>>> use strict; > > >>>>> use warnings; > > >>>>> > > >>>>> use Email::Send::SMTP::Gmail; > > >>>>> > > >>>>> my ($mail,$error)=Email::Send::SMTP::Gmail->new( > > >>>>> -smtp=>'smtp.gmail.com', > > >>>>> -login=>'amagdum@identlogic.com', > > >>>>> -pass=>'XXX'); > > >>>>> > > >>>>> print "session error: $error" unless ($mail!=-1); > > >>>>> > > >>>>> $mail->send(-to=>'sanjay@banerji.in', -subject=>'Hello!', > > >>>>> -body=>'Just > > >>>>> testing it'); > > >>>>> > > >>>>> $mail->bye; > > >>>>> > > >>>>> Both sender & receiver are google hosted emails. > > >>>>> > > >>>>>
> > > > > >