我試圖發送電子郵件在laravel與godaddy帳戶,但我總是得到一個錯誤電子郵件與laravel SMTP的Godaddy帳戶失敗?
Swift_TransportException在AbstractSmtpTransport.php行383: 預期的響應代碼250,但得到的代碼「501」,與消息「501 HELO需要有效的地址」
下面我控制器用於發送電子郵件代碼:
$title = 'Test email';
$content = 'Test email from shingora';
Mail::send('emails.send', ['title' => $title, 'content' => $content], function ($message) {
$message->from('[email protected]', 'Shingora');
$message->subject('Test email');
$message->to('[email protected]');
});
而且在mail.php
return [
'driver' => 'smtp',
'host' => 'smtpout.asia.secureserver.net',
'port' => 25,
'from' => ['address' => '[email protected]', 'name' => 'test'],
'encryption' => 'ssl',
'username' => '[email protected]',
'password' => '********',
'sendmail' => 'D:\sendmail\sendmail -bs',
'pretend' => false,
];
有同樣的問題,但在我的情況下發送電子郵件(從電子郵件)屬於到自己的領域。請提出一些解決方案。 –