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";
In reply to Gmail ssl pop mail stopped working. (SOLVED) by zentara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |