Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: s.banguero [...] gmail.com
Cc:
AdminCc:

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



Subject: Can't locate object method send
Date: Thu, 19 Dec 2013 17:24:14 -0500
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Sergio Banguero <s.banguero [...] gmail.com>
I am getting this error when running the following code: ERROR: Could not connect to SMTP server Can't locate object method "send" via package "-1" (perhaps you forgot to load " -1"?) at send_email.pl line 73. CODE: use strict; use warnings; use Email::Send::SMTP::Gmail; my $mail=Email::Send::SMTP::Gmail->new( -smtp=>$SMTP_SERVER, -login=>$EMAIL_FROM, -pass=>$PASSWORD, -layer=>$LAYER, -port=>587); $mail->send(-to=>$EMAIL_TO, -subject=>$EMAIL_SUBJECT, -body=>$CCC_HEADER); $mail->bye; This runs OK on Windows 7 SP2 64 bit. I dont have the error (perl, v5.10.1 (*) built for MSWin32-x86-multi-thread) When I run it on Windows Server 2008 R2 64bit it fails, it only recognizes the *new* method, *send *or *bye *are not recognized. I am using strawberry perl 5.18.1.1. I tried both 32 and 64 bit versions I checked the Gmail.pm and it does have the sub for send and for mail, not sure why is not being properly picked up. Thanks
Hello. If something goes wrong and the Gmail object cannot be created, then no other method can be recognized. Do you have any error message? (for example Auth failed, etc) Please, enable the debug and verbose modes (at *new* and *send* methods) to see the error. my $mail=Email::Send::SMTP::Gmail->new( -smtp=>$SMTP_SERVER, -login=>$EMAIL_FROM, -pass=>$PASSWORD, -layer=>$LAYER, -port=>587, -verbose=>1, -debug=>1); $mail->send(-to=>$EMAIL_TO, -subject=>$EMAIL_SUBJECT,-body=>$CCC_HEADER, -verbose=>1,-debug=>1); Thanks
Subject: Re: [rt.cpan.org #91528] Can't locate object method send
Date: Fri, 20 Dec 2013 10:21:55 -0500
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Sergio Banguero <s.banguero [...] gmail.com>
On Fri, Dec 20, 2013 at 9:43 AM, Juan Jose San Martin via RT < bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: Show quoted text
> -verbose=>1, > -debug=>1); >
Hello, Thanks for your reply. I added the -verbose and -debug parameters. This is the output: Connecting to <SMTP Server> using tls with LOGIN Net::SMTPS>>> Net::SMTPS(0.03) Net::SMTPS>>> IO::Socket::INET6(2.71) Net::SMTPS>>> IO::Socket(1.36) Net::SMTPS>>> IO::Handle(1.34) Net::SMTPS>>> Exporter(5.68) Net::SMTPS>>> Net::SMTP(2.31) Net::SMTPS>>> Net::Cmd(2.29) Net::SMTPS>>> IO::Socket::INET(1.33) Could not connect to SMTP server Can't locate object method "send" via package "-1" (perhaps you forgot to load "-1"?) at Send_mail.pl line 13. Line 13 is: $mail->send(-to=>$EMAIL_FROM, -subject=>'Hello!', -body=>'Just testing it', -verbose=>1, -debug=>1); This is for perl -v: This is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x86-multi-thread-64int Thanks Sergio
Hi. Ok, the issue is: "Could not connect to SMTP server" Are you connecting to gmail, or is another server?. Please, double check that your SMTP server is able to work with TLS (or adjust the -layer) If it's possible, try to use Gmail to verify that everything is correct from the network viewpoint. Thanks
On Fri Dec 20 16:22:24 2013, PECO wrote: Show quoted text
> Hi. > > Ok, the issue is: "Could not connect to SMTP server" > > Are you connecting to gmail, or is another server?. Please, double > check that your SMTP server is able to work with TLS (or adjust the > -layer) > > If it's possible, try to use Gmail to verify that everything is > correct from the network viewpoint. > > Thanks
Subject: Re: [rt.cpan.org #91528] Can't locate object method send
Date: Mon, 10 Nov 2014 08:03:22 -0500
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Sergio Banguero <s.banguero [...] gmail.com>
gracias! On Sun, Nov 9, 2014 at 4:46 AM, Juan Jose San Martin via RT < bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=91528 > > > On Fri Dec 20 16:22:24 2013, PECO wrote:
> > Hi. > > > > Ok, the issue is: "Could not connect to SMTP server" > > > > Are you connecting to gmail, or is another server?. Please, double > > check that your SMTP server is able to work with TLS (or adjust the > > -layer) > > > > If it's possible, try to use Gmail to verify that everything is > > correct from the network viewpoint. > > > > Thanks
> > > >
-- Sergio Banguero Bogota, Colombia