【发布时间】:2017-10-29 12:57:04
【问题描述】:
我创建 VPS 并在 mail.mywebsite.com 中安装 zimbra mail 而 mywebsite.com 在其他 VPS 中。
我在config 文件夹中的mail.php:
'driver' => 'smtp',
'host' => 'mail.mywebsite.com',
'from' => [
'address' => 'customers@mywebsite.com',
'name' => 'mywebsite.com'
],
'encryption' => env('MAIL_ENCRYPTION', 'No Encryption'),
'username' => 'info@mywebsite.com',
'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,我更新了我的问题:-)
-
您应该先在 .env 文件中更改您的电子邮件配置文件
标签: php laravel email laravel-5.3 zimbra