【问题标题】:How to configure .env file to send mails in production using laravel 5.5如何配置 .env 文件以使用 laravel 5.5 在生产环境中发送邮件
【发布时间】:2018-08-26 14:34:28
【问题描述】:

我想知道如何配置下面的.env文件sn-p

     MAIL_DRIVER=smtp
     MAIL_HOST=smtp.mailtrap.io
     MAIL_PORT=2525
     MAIL_USERNAME=null
     MAIL_PASSWORD=null
     MAIL_ENCRYPTION=null

据我所知,smptp 驱动程序和 maitrap 仅用于开发。

请使用正确的配置;哪个邮件驱动程序,主机等 我正在上传到 namecheap 服务器。

【问题讨论】:

  • 您要添加哪个电子邮件地址?电子邮件是来自您自己的域还是来自 gmail yahoo 或其他任何东西?
  • 我的域中的一个

标签: php laravel email configuration


【解决方案1】:

在生产过程中,您仍然可以使用 smtp 发送电子邮件。这就是你应该如何配置 .env 文件

 MAIL_DRIVER=smtp
 # You will have to find your own server address and use it instead of server126.web-hosting.com 
 MAIL_HOST=server126.web-hosting.com 
 MAIL_PORT=465     
 MAIL_USERNAME=your_namecheap_username
 MAIL_PASSWORD=your_namecheap_password
 MAIL_ENCRYPTION=ssl

有关配置和查找服务器详细信息的更多详细信息click here

【讨论】:

    猜你喜欢
    • 2019-03-01
    • 1970-01-01
    • 2018-12-07
    • 1970-01-01
    • 2021-03-21
    • 1970-01-01
    • 2014-03-06
    • 1970-01-01
    • 2023-04-02
    相关资源
    最近更新 更多