本文介绍了在GoDaddy服务器上发送电子邮件时出错:Laravel 5.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在Laravel 5.1中使用Login System的内置模板
当我在本地主机上使用忘记密码"时,一切正常.以下是我在.env文件中的密钥
When I use Forgot Password on localhost, everything works. Below are my keys in .env file
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=userid
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
当我在Godaddy服务器上尝试相同的操作时,我遇到了以下错误.
When I try the same thing on Godaddy server, I am facing the below error.
推荐答案
您的环境文件必须如下所示
MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=465
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=ssl
在您的config/mail.php
中,起始值应如下所示...
In your config/mail.php
, the from value should be like below...
'from' => ['address' => '[email protected]', 'name' => 'Sender Name'],
您的域名来自什么?或者您可以说,如何在GoDaddy中创建电子邮件帐户?
- 登录您的GoDaddy帐户
- 转到您的托管帐户.
- 点击管理
- 在电子邮件"类别下,请单击帐户"
- 如果没有电子邮件帐户,请创建一个帐户.
- Login in your GoDaddy Account
- Go to your Hosting Account.
- Click Manage
- Under Email category, Please click Accounts
- Create an account if there is no email account.
就是这样.
因此,假设您拥有[email protected]之类的电子邮件地址
So let's say you have email address like [email protected]
现在,将此电子邮件地址放在config/mail.php中,用于发件人字段.就是这样.
Now, put this email address in config/mail.php for from field. That's it.
这将100%解决该问题
This will 100% fix the issue
这篇关于在GoDaddy服务器上发送电子邮件时出错:Laravel 5.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!