我創建VPS並在mail.mywebsite.com上安裝zimbra mail
,mywebsite.com在其他VPS中。如何在Laravel 5.3中爲zimbra郵件服務器配置mail.php?
我mail.php
在config
文件夾:
'driver' => 'smtp',
'host' => 'mail.mywebsite.com',
'from' => [
'address' => '[email protected]',
'name' => 'mywebsite.com'
],
'encryption' => env('MAIL_ENCRYPTION', 'No Encryption'),
'username' => '[email protected]',
'password' => '*******',
'sendmail' => '/usr/sbin/sendmail -bs',
在.env
文件:
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
- 我可以看到
mail.mywebsite.com:7520
。 - 我的項目是
Laravel 5.3
。
但之後發送郵件,看到此錯誤:
Swift_TransportException in StreamBuffer.php line 268:
Connection could not be established with host mail.mywebsite.com[Connection timed out #110]
你能解決這個問題?
謝謝。
你能告訴.ENV文件配置 –
嗨@BikashP,我更新我的問題:-) – mySun
您應該更改您的電子郵件配置文件中.ENV文件第一 –