MIME :: Lite - 无法发送邮件[smtp.gmail.com上不支持SMTP验证()命令] [英] MIME::Lite - Cannot send mail [SMTP auth() command not supported on smtp.gmail.com]
问题描述
使用MIME :: Lite;
使用警告;
使用MIME :: Base64;
使用Authen :: SASL;
使用MIME :: Lite;
使用MIME :: Base64;
使用Authen :: SASL;
使用警告;
使用Net :: SMTP :: TLS;
使用Data :: Dumper;
使用MIME :: Lite;
$ to ='pratapchintha@gmail.com';
$ cc ='pratapchintha@gmail.com';
$ from ='pratapchintha@gmail.com';
$ subject ='测试电子邮件';
$ message ='email';
$ msg = MIME :: Lite-> new(
From => $ from,
To => $ to,
Cc => $ cc,
Subject => $ subject,
Type =>'multipart / mixed'
);
$ msg-> attach(Type =>'text',
Data => $ message
);
$ msg-> attach(Type =>'image / gif',
Path =>'C:\Users\chintpra\Desktop\excel\ Feb_4.xls',
Filename =>'logo.gif',
Disposition =>'attachment'
);
$ msg-> send('smtp',smtp.gmail.com,AuthUser =>$ from,AuthPass =>*******,Debug => 1);
打印发送邮件成功\\;
输出
MIME :: Lite :: SMTP>>> MIME :: Lite :: SMTP
MIME :: Lite :: SMTP>>> Net :: SMTP(3.05)
MIME :: Lite :: SMTP>>> Net :: Cmd(3.05)
MIME :: Lite :: SMTP>>> Exporter(5.67)
MIME :: Lite :: SMTP>>> IO :: Socket :: INET(1.33)
MIME :: Lite :: SMTP>>> IO :: Socket(1.34)
MIME :: Lite :: SMTP>>> IO :: Handle(1.33)
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<<< 220 mx.google.com ESMTP gj9sm3721288pbc.32 - gsmtp
MIME :: Lite :: SMTP = GLOB(0x2c030e0)>>> EHLO localhost.localdomain
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<< 250-mx.google.com在您的服务中,[123.63.237.69]
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<< 250-SIZE 35882577
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<< 250-8BITMIME`enter code here`
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<<< 250-STARTTLS
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<< 250-ENHANCEDSTATUSCODES
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<< 250-PIPELINING
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<< 250-CHUNKING
MIME :: Lite :: SMTP = GLOB(0x2c030e0)<<< 250 SMTPUTF8
smtp.gmail.com不支持SMTP auth()命令
任何人都可以让我知道最新的错误以及如何解决它? :SMTP 3.05]
警告: MIME :: Lite
传递给 Net :: SMTP
- 请参阅 MIME :: Lite 3.030 - 使用smtps(端口465)的NET :: SMTP
AFAIK Gmail提供SMTP 使用Net :: SMTP 3.05,您可以使用SMTPS作为干净修补程序。 AUTH
overecypted connections
(通过SMTPS连接或在 STARTTLS
SMTP命令后)。
低于3.0的Net :: SMTP版本不支持SMTPS。
[警告: 请参阅 MIME :: L使用smtps(port 465)]
$ msg-> send(' smtp',smtp.gmail.com,
SSL => 1,
AuthUser =>$ from,AuthPass =>*******,
Debug => 1);
use MIME::Lite;
use warnings;
use MIME::Base64;
use Authen::SASL;
use MIME::Lite;
use MIME::Base64;
use Authen::SASL;
use warnings;
use Net::SMTP::TLS;
use Data::Dumper;
use MIME::Lite;
$to = 'pratapchintha@gmail.com';
$cc = 'pratapchintha@gmail.com';
$from = 'pratapchintha@gmail.com';
$subject = 'Test Email';
$message = 'email';
$msg = MIME::Lite->new(
From => $from,
To => $to,
Cc => $cc,
Subject => $subject,
Type => 'multipart/mixed'
);
$msg->attach(Type => 'text',
Data => $message
);
$msg->attach(Type => 'image/gif',
Path => 'C:\Users\chintpra\Desktop\excel\Feb_4.xls',
Filename => 'logo.gif',
Disposition => 'attachment'
);
$msg->send('smtp', "smtp.gmail.com", AuthUser=>"$from", AuthPass=>"*******",Debug=>1);
print "Email Sent Successfully\n";
output
MIME::Lite::SMTP>>> MIME::Lite::SMTP
MIME::Lite::SMTP>>> Net::SMTP(3.05)
MIME::Lite::SMTP>>> Net::Cmd(3.05)
MIME::Lite::SMTP>>> Exporter(5.67)
MIME::Lite::SMTP>>> IO::Socket::INET(1.33)
MIME::Lite::SMTP>>> IO::Socket(1.34)
MIME::Lite::SMTP>>> IO::Handle(1.33)
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 220 mx.google.com ESMTP gj9sm3721288pbc.32 - gsmtp
MIME::Lite::SMTP=GLOB(0x2c030e0)>>> EHLO localhost.localdomain
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 250-mx.google.com at your service, [123.63.237.69]
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 250-SIZE 35882577
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 250-8BITMIME`enter code here`
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 250-STARTTLS
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 250-ENHANCEDSTATUSCODES
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 250-PIPELINING
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 250-CHUNKING
MIME::Lite::SMTP=GLOB(0x2c030e0)<<< 250 SMTPUTF8
SMTP auth() command not supported on smtp.gmail.com
Can anyone let me know whats going wrong and how to fix it ?
MIME::Lite - sending via Gmail [SMTPS - Net::SMTP 3.05]
WARNING: MIME::Lite
filters parameters passed to Net::SMTP
- see MIME::Lite 3.030 - NET::SMTP with smtps (port 465)
AFAIK Gmail offers SMTP AUTH
overecypted connections
(over SMTPS connections or after STARTTLS
SMTP command).
With Net::SMTP 3.05 you may use SMTPS as a clean fix.
Net::SMTP versions below 3.0 do not support SMTPS.
[ WARNING: see MIME::Lite 3.030 - NET::SMTP with smtps (port 465) ]
$msg->send('smtp', "smtp.gmail.com",
SSL=>1,
AuthUser=>"$from", AuthPass=>"*******",
Debug=>1);
这篇关于MIME :: Lite - 无法发送邮件[smtp.gmail.com上不支持SMTP验证()命令]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!