如何在Laravel 5.3中为zimbra邮件服务器配置mail.php? [英] How to config mail.php for zimbra mail server in Laravel 5.3?

查看:82
本文介绍了如何在Laravel 5.3中为zimbra邮件服务器配置mail.php?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了VPS,并在mail.mywebsite.com中安装了zimbra mail,而mywebsite.com在其他VPS中.

I create VPS and install zimbra mail in mail.mywebsite.com and mywebsite.com is in other VPS.

我的mail.phpconfig文件夹中:

'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

  1. 我可以看到mail.mywebsite.com:7520.
  2. 我的项目是Laravel 5.3.
  1. I can see mail.mywebsite.com:7520.
  2. My project is Laravel 5.3.

但是在发送邮件之后,看到此错误:

But after send mail, see this error:

Swift_TransportException in StreamBuffer.php line 268:
Connection could not be established with host mail.mywebsite.com[Connection timed out #110]

您能解决这个问题吗?

谢谢.

推荐答案

.env文件将如下所示

.env file will look like this

MAIL_DRIVER=smtp
MAIL_HOST=smtp host
MAIL_PORT=25
MAIL_USERNAME=user_name
MAIL_PASSWORD=password
MAIL_ENCRYPTION=TLS

这篇关于如何在Laravel 5.3中为zimbra邮件服务器配置mail.php?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆