【问题标题】:mail::sendmail client not authenticated errormail::sendmail 客户端未通过身份验证错误
【发布时间】:2017-12-15 21:23:49
【问题描述】:

我正在尝试使用 Mail::Sendmail 包发送邮件。然而我收到了这个错误:

MAIL FROM:错误(530 5.7.57 SMTP;客户端未通过身份验证 在 MAIL FROM 期间发送匿名邮件)

我怀疑这与我的santaclaus@christmas.com 邮件有关?

    use Mail::Sendmail qw(sendmail %mailcfg);
unshift @{$Mail::Sendmail::mailcfg{'smtp'}} , 'smtp.office365.com:587';
%mail = ( To => 'existingmail@outlook.com',
          From => 'santaclaus@christmas.com',
          Message => "Time for surprises and gifts is approaching..."
);

sendmail(%mail) or die $Mail::Sendmail::error;
print "OK. Log says:\n", $Mail::Sendmail::log;

【问题讨论】:

    标签: perl email smtp sendmail


    【解决方案1】:

    似乎 smtp.office365.com 需要 SMTP AUTH 命令(SMTP 身份验证)才能接受电子邮件以进行发送。
    Mail::Sendmail 支持 SMTP 身份验证。

    http://search.cpan.org/~mivkovic/Mail-Sendmail-0.79/Sendmail.pm

    限制
    [...]
    不支持 SMTP AUTH 扩展。

    【讨论】:

      猜你喜欢
      • 2015-08-01
      • 2018-08-02
      • 1970-01-01
      • 2016-12-14
      • 1970-01-01
      • 1970-01-01
      • 2012-04-25
      • 1970-01-01
      • 2013-03-28
      相关资源
      最近更新 更多