in reply to Re^3: Send email via Gmail
in thread Send email via Gmail
use Net::SMTP; my $smtp = Net::SMTP->new('smtp.gmail.com', Hello => 'smtp.gmail.com', Timeout => 30, Debug => 1, SSL => 1 ) || die "Error: $!"; $smtp->auth($CFG->{db_smtp_user}, $CFG->{db_smtp_pass}) or die "C +ould not authenticate with mail.\n"; $smtp->data(); $smtp->datasend($email) || die $!; $smtp->dataend() || die $smtp->message();
5.5.1 Unrecognized command. vs7sm25292357wjb.10 - gsmtp
Net::SMTP::_SSL>>> Net::SMTP::_SSL Net::SMTP::_SSL>>> IO::Socket::SSL(2.019) Net::SMTP::_SSL>>> IO::Socket::IP(0.32) Net::SMTP::_SSL>>> IO::Socket(1.38) Net::SMTP::_SSL>>> IO::Handle(1.35) Net::SMTP::_SSL>>> Exporter(5.71) Net::SMTP::_SSL>>> Net::SMTP(3.10) Net::SMTP::_SSL>>> Net::Cmd(3.10) ******* Net::SMTP::_SSL=GLOB(0x1f5e100)<<< 220 smtp.gmail.com ESMTP y2sm147858 +26wjx.20 - gsmtp ******* Net::SMTP::_SSL=GLOB(0x1f5e100)>>> EHLO localhost.localdomain Net::SMTP::_SSL=GLOB(0x1f5e100)<<< 250-smtp.gmail.com at your service, + [2a01:7e00::f03c:91ff:fea8:e2c5]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Send email via Gmail
by hippo (Archbishop) on Oct 08, 2016 at 14:55 UTC |