use MIME::Lite;
$msg = MIME::Lite->new(
From =>'myname@gmail.com',
To =>'myname@gmail.com',
Subject =>'Helloooooo, nurse!',
Data =>"How's it goin', eh?"
);
$msg->send('smtp', 'smtp.gmail.com', AuthUser=>'myname@gmail.com'
+, AuthPass=>'mypassword', Debug=>1);
This is what I am getting:
C:\tmp>perl smtp.pl
MIME::Lite::SMTP>>> MIME::Lite::SMTP
MIME::Lite::SMTP>>> Net::SMTP(2.31)
MIME::Lite::SMTP>>> Net::Cmd(2.29)
MIME::Lite::SMTP>>> Exporter(5.63)
MIME::Lite::SMTP>>> IO::Socket::INET(1.31)
MIME::Lite::SMTP>>> IO::Socket(1.30)
MIME::Lite::SMTP>>> IO::Handle(1.27)
MIME::Lite::SMTP=GLOB(0x1be605c)<<< 220 mx.google.com ESMTP t1sm546166
+8poh.9
MIME::Lite::SMTP=GLOB(0x1be605c)>>> EHLO localhost.localdomain
MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250-mx.google.com at your service,
+ [59.95.64.55]
MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250-SIZE 35651584
MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250-8BITMIME
MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250-ENHANCEDSTATUSCODES
MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250 PIPELINING
SMTP auth() command not supported on smtp.gmail.com
It is failing because of following:
SMTP auth() command not supported on smtp.gmail.com
Any Pointers?
|