Dandello has asked for the wisdom of the Perl Monks concerning the following question:
This isn't creating the new Net::SMTP::SSL object - so of course it fails. But even with Debug on, I'm not getting back anything that tells me why it's failing. I've got a version of this using Net::SMTP::TLS and it connects fine to gmail. But I'm missing something with the SSL version. (I do have a valid SSL Cert for the actual domain this script is installed at.) This is driving me batty.#!/usr/bin/perl use strict; use warnings; use Net::SMTP::SSL; use English '-no_match_vars'; our @ARGV = ( 'mygmail@gmail.com', 'mypassword', 'touser@forumsoftware +.com', 'mygmail@gmail.com' ); my $body = "Test message"; my $headers = "Content-Type: text/plain\r\n\r\n"; my $smtp_server = 'smtp.gmail.com'; my $port = 465; my $mailer = new Net::SMTP::SSL( $smtp_server, Hello => 'mydomain.com', Port => $port, Debug => 1, layer=> 'ssl', ) || die "Unable to create Net::SMTP::SSL object. Server: '$smtp_s +erver', port '$port'\n\n" . $OS_ERROR; $mailer->auth($ARGV[0], $ARGV[1]); $mailer->mail($ARGV[3]); $mailer->to($ARGV[2]); $mailer->data(); $mailer->datasend("Subject: SMTP SSL test\r\n\r\n" . $headers . $body) +; $mailer->dataend; $mailer->quit; exit();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SMTP::SSL ACK!!
by hippo (Archbishop) on Jan 29, 2016 at 11:45 UTC | |
by Dandello (Monk) on Jan 29, 2016 at 17:15 UTC | |
by Anonymous Monk on Jan 29, 2016 at 20:04 UTC | |
by Dandello (Monk) on Jan 30, 2016 at 00:54 UTC | |
by jcb (Parson) on Jan 30, 2016 at 02:49 UTC | |
| |
by Dandello (Monk) on Feb 02, 2016 at 16:45 UTC | |
by hippo (Archbishop) on Feb 02, 2016 at 17:48 UTC | |
by Dandello (Monk) on Feb 02, 2016 at 18:33 UTC | |
by noxxi (Pilgrim) on Feb 02, 2016 at 23:58 UTC | |
by Dandello (Monk) on Feb 03, 2016 at 05:44 UTC | |
|