Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: pincus [...] uniprouniforms.com
Cc:
AdminCc:

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



Subject: Email-Send-SMTP-Gmail Bug.
Date: Thu, 9 Jun 2016 08:58:02 -0400
To: <bug-Email-Send-SMTP-Gmail [...] rt.cpan.org>
From: "Pincus Glauber \(G\)" <pincus [...] uniprouniforms.com>
Hi Im trying to use the gmail cpan module on a cgi script. I get the following error: Connecting to smtp.gmail.com using tls with LOGIN on port 465 and timeout of 60 Could not connect to SMTP server. (I tried the same with port 25 and default layer. Software error: Can't locate object method "send" via package "Net::SMTPS: connect: Network is unreachable" (perhaps you forgot to load "Net::SMTPS: connect: Network is unreachable"?) at test.cgi line 13. I tried Telnet on the linux server (The server where the script runs..) Following is the result: This is my cgi script: #!/usr/bin/perl -w use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI::Carp qw(carpout); print "Content-type: text/html\n\n"; use Email::Send::SMTP::Gmail; my $mail=Email::Send::SMTP::Gmail->new( -debug => 1,-smtp=>'smtp.gmail.com', -login=>'jpglauber@gmail.com', -pass=>'my password here', -port=>465,layer=> 'ssl'); $mail->send(-to=>'pincus@uniprouniforms.com', -subject=>'Hello!', -body=>'Just testing it<br>Bye!',-contenttype=>'text/html',-verbose=>1,-debug=>1); $mail->bye; print 'Main Sent...'; 1 I also tried pincus@uniprouniforms.com (Which is our domain with gmail and used with ms-outlook Thanks in advance for your support Pincus Glauber UniPro International 390 Nye Ave - Irvington NJ 07111 Office: 973-577-1300 Fax: 973-622-1446 Direct: 347-623-2439
Download image001.png
image/png 8k
image001.png
Hi, I think that the issue is related to how you connect to SMTP, and not directly to the module itself. Please check: 1) version of Net::SMTPS (>= 0.04) 2) run telnet with the same user that executes the script 3) run the script as a user (not cgi) in order to validate it With your configuration, you should see something like this: ---- Connecting to smtp.gmail.com using ssl with LOGIN on port 465 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(0x1a911e0)<<< 220 smtp.gmail.com ESMTP f1sm7660285wmf.22 - gsmtp ... Regards, Peco On Thu Jun 09 08:58:19 2016, pincus@uniprouniforms.com wrote: Show quoted text
> Hi Im trying to use the gmail cpan module on a cgi script. > > > > I get the following error: > > > > Connecting to smtp.gmail.com using tls with LOGIN on port 465 and timeout of > 60 Could not connect to SMTP server. (I tried the same with port 25 and > default layer. > > Software error: > > Can't locate object method "send" via package "Net::SMTPS: connect: Network > is unreachable" (perhaps you forgot to load "Net::SMTPS: connect: Network is > unreachable"?) at test.cgi line 13. > > > > > > I tried Telnet on the linux server (The server where the script runs..) > Following is the result: > > > > > > > > > > This is my cgi script: > > > > #!/usr/bin/perl -w > > use CGI::Carp qw(fatalsToBrowser warningsToBrowser); > > use CGI::Carp qw(carpout); > > > > print "Content-type: text/html\n\n"; > > > > use Email::Send::SMTP::Gmail; > > my $mail=Email::Send::SMTP::Gmail->new( -debug => 1,-smtp=>'smtp.gmail.com', > > > -login=>'jpglauber@gmail.com', > > > -pass=>'my password here', > > > -port=>465,layer=> 'ssl'); > > > > $mail->send(-to=>'pincus@uniprouniforms.com', -subject=>'Hello!', > > -body=>'Just testing > it<br>Bye!',-contenttype=>'text/html',-verbose=>1,-debug=>1); > > $mail->bye; > > > > print 'Main Sent...'; > > > > 1 > > > > I also tried pincus@uniprouniforms.com (Which is our domain with gmail and > used with ms-outlook > > > > > > > > Thanks in advance for your support > > > > > > Pincus Glauber > > UniPro International > > 390 Nye Ave - Irvington NJ 07111 > > Office: 973-577-1300 > > Fax: 973-622-1446 > > Direct: 347-623-2439 > > > > > > > > > > > > >
Subject: RE: [rt.cpan.org #115188] Email-Send-SMTP-Gmail Bug.
Date: Thu, 9 Jun 2016 09:43:24 -0400
To: <bug-Email-Send-SMTP-Gmail [...] rt.cpan.org>
From: "Pincus Glauber \(G\)" <pincus [...] uniprouniforms.com>
Pincus Glauber UniPro International 390 Nye Ave - Irvington NJ 07111 Office: 973-577-1300 Fax: 973-622-1446 Direct: 347-623-2439 Show quoted text
-----Original Message----- From: Juan Jose San Martin via RT [mailto:bug-Email-Send-SMTP-Gmail@rt.cpan.org] Sent: Thursday, June 09, 2016 9:20 AM To: pincus@uniprouniforms.com Subject: [rt.cpan.org #115188] Email-Send-SMTP-Gmail Bug. <URL: <https://rt.cpan.org/Ticket/Display.html?id=115188> https://rt.cpan.org/Ticket/Display.html?id=115188 > Hi, I think that the issue is related to how you connect to SMTP, and not directly to the module itself. Please check: 1) version of Net::SMTPS (>= 0.04) 2) run telnet with the same user that executes the script Here it says Permission denied.. 3) run the script as a user (not cgi) in order to validate it With your configuration, you should see something like this:
Download image001.png
image/png 11.8k
image001.png
Not more information. Closed