July 23, 2011 I took a look at Email::Send::SMTP::Gmail and although it didn't say it in the description, it uses the ssl connection on port 465, AND IT WORKS!. After looking closely at the module's code, I guess my code must be missing a Content-Type header, or some little detail. So you can use Email::Send::SMTP::Gmail for ssl. See example module code below in response.

Hi, a recent node here on Gmail got me to test my Gmail ssl script, which worked last year, which was the last time I tried it. Now, the script executes without error, but the mail dosn't show up in Gmail. The instructions are on gmail configure page. Here is the script. It works past the auth, because it dosn't die there, and it prints done, so I know I'm connecting. However, no message appears in my Gmail inbox.

P.S. ssl sending and receiving works fine from my regular gui mail program using these settings.

#!/usr/bin/perl use warnings; use strict; use Net::SMTP::SSL; + my $user = 'me@gmail.com'; my $pass = 'foobarbaz'; #$server = 'your-smtp-server'; my $server = 'smtp.gmail.com'; my $to = 'me@gmail.com'; my $from_name = 'me'; my $from_email = 'me@gmail.com'; my $subject = 'smtp-ssl-auth test'; my $smtps = Net::SMTP::SSL->new($server, Port => 465, DEBUG => 1, ) or warn "$!\n"; # I just lucked out and this worked defined ($smtps->auth($user, $pass)) or die "Can't authenticate: $!\n"; $smtps->mail($from_email); $smtps->to($to); $smtps->data(); $smtps->datasend("To: $to\n"); $smtps->datasend(qq^From: "$from_name" <$from_email>\n^); $smtps->datasend("Subject: $subject\n\n"); $smtps->datasend("This will be the body of the message.\n"); $smtps->datasend("\n--\nVery Official Looking .sig here\n"); $smtps->dataend(); $smtps->quit(); print "done\n";

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Gmail ssl pop mail stopped working. (SOLVED) by zentara

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.