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