in reply to Re^4: Using Email::Stuff to send SMTP mail through GMail
in thread Using Email::Stuff to send SMTP mail through GMail

I am on Linux, Perl 5.8.8.

I must be missing something. I don't see how your suggestion differs from what I did at the outset. I have a simple test script that tries to connect via SSL. But I don't understand enough about the mechanism in the connectivity layer to troubleshoot what is happening in the interim between my script and their servers.

I tried to break it down by just using Email::Send::SMTP to send a message:

#!/usr/bin/perl use warnings; use strict; use Email::Send; my $mailer = Email::Send->new({mailer => 'SMTP'}); $mailer->mailer_args([Host => 'smtp.gmail.com:465', ssl => 1, username => 'mike@mikebaas.com', password => 'xxx']); my $message = "From: mike\@mikebaas.com To: test\@mikebaas.com Subject: testing This is the test message body."; my $result = $mailer->send($message); print "$result\n";

The value of $result is:

Couldn't connect to smtp.gmail.com:465

Not quite sure how to get more detail out of the module.