我想從我的Laravel應用程序發送電子郵件,但我得到這個錯誤:我有麻煩從我Laravel 5.3的應用程序發送電子郵件
Swift_TransportException in StreamBuffer.php line 268: Connection could not be established with host gnom.websitewelcome.com [ #0]
這是我.ENV文件:
MAIL_DRIVER=smtp
MAIL_HOST=gnom.websitewelcome.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=mypass
MAIL_ENCRYPTION=ssl
而且我從我的web.php文件的測試是這樣的:
Route::any('mail', function() {
$cliente = Auth::user();
Mail::send('backend.emails.bills',
[
],
function ($m) use ($cliente) {
$m->from('[email protected]', 'My Name');
$m->to('[email protected]', 'Title')->subject('Foo subject');
});
});
我用盡了一切我從迪菲讀租網上帖子,但我得到相同的錯誤...
有人可以幫助我嗎?
您是否試圖連接一些電子郵件客戶端,如Thunderbird或Outlook?有用? –
不,但我有權訪問網絡郵件,並且出現同樣的錯誤。 –
您需要聯繫管理員以瞭解如何在其服務上使用SMTP。 –