2015-12-16 42 views
0

我正嘗試使用Mail :: Sendmail包發送郵件。然而,我收到此錯誤:mail :: sendmail客戶端未通過驗證錯誤

MAIL FROM: error (530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM)

我懷疑這事與我[email protected]郵件?

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

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

回答