本文介绍了Laravel 5.2重设密码+ Mandrill的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有Laravel 5.2的全新安装.

I have Laravel 5.2 fresh installation.

我做了以下事情:

  1. 我已经设置了.env文件MAIL_DRIVER=mandrillSECRET=my_mandrill_api_key
  2. 我已经安装了Guzzle( https://github.com/guzzle/guzzle )
  3. 我已设置了我的电子邮件视图( https://github.com/laravel/laravel/blob/5.0/resources/views/emails/password.blade.php )
  4. 我已修复证书问题( PHP cURL错误代码60 )
  1. I have set up my .env file MAIL_DRIVER=mandrillSECRET=my_mandrill_api_key
  2. I have installed Guzzle (https://github.com/guzzle/guzzle)
  3. I have setup my email in view (https://github.com/laravel/laravel/blob/5.0/resources/views/emails/password.blade.php)
  4. I have fixed the certificate issue (PHP cURL error code 60)

所以看来一切都正确完成了.

So it seems everything is done correctly.

当我填写电子邮件以重置密码并按发送密码重置链接"按钮时,出现以下错误

When I fill email to reset password and press Send Password Reset Link button, I get following error

我已经在Mandrill中检查了我的日志( https://mandrillapp.com/settings/api )没有我的操作日志.

I have check my log in Mandrill (https://mandrillapp.com/settings/api) there is no logs for my action.

从Mandrill的错误来看,我知道它没有获得api密钥,因此由于某些原因api密钥和其他值未传递给Mandrill api.

From the error of Mandrill, I know it does not get the api key, so for some reason the api key and other values is not passing over to Mandrill api.

问题:缺少/错了什么?

注意:目前,我正在本地环境中构建应用程序.我的本地环境Windows 10/Bitnami WAMP stack 7/我也在使用Mandrill API.

Note: right now I am working on my local environment building the app. My local environment Windows 10/Bitnami WAMP stack 7/ I am also using Mandrill API.

推荐答案

如果使用的是Mandrill驱动程序,则必须在.env文件中设置MANDRILL_SECRET.

If you are using the Mandrill driver then you must set the MANDRILL_SECRET in your .env file.

其他设置MAIL_HOSTMAIL_PORT等用于其他驱动程序.

The other settings MAIL_HOST, MAIL_PORT and so on are for use with other drivers.

有关使用Mandrill驱动程序的信息,请参见此处.它提到您应该在config/services.php中设置Mandrill键,但实际上应该使用环境变量进行设置,因此,如果您已自定义文件,则将其更改回

See the documentation here about using the Mandrill driver. It mentions that you should set the Mandrill key in config/services.php but you should really set that using an environment variable, so if you have customized the file change it back to

'mandrill' => [
    'secret' => env('MANDRILL_SECRET'),
],

然后,您将可以从.env文件中读取MANDRILL_SECRET值.

Then you will be able to read the MANDRILL_SECRET value from the .env file.

因此,在您的.env文件中;

So in your .env file you'll have;

MAIL_DRIVER=mandrill
MANDRILL_SECRET=your_mandrill_key_here

这篇关于Laravel 5.2重设密码+ Mandrill的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 22:31