Laravel使用MailGun发送邮件

时间:2015-10-21 10:42:22

标签: php email laravel

我安装guzzle用mailgun发送邮件,我创建mailgun帐户

这是我的mail.php

'driver' => 'mailgun',
'host' => 'smtp.mailgun.org',
'port' => 587,
'from' => array('address' =>'my@gmail.com','name'=>'My Name'),
'encryption' => 'tls',
'username' => null,
'password' => null,
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,

和我的services.php

'mailgun' => [
    'domain' => 'sandboxexxxxxxxxxxxxxxxxxxxxx.mailgun.org',
    'secret' => 'key-xxxxxxxxxxxxxxxxxxxxxxx',
],

但我得到错误,我已经设置正确,但问题是什么?

ClientException第69行中的

Middleware.php

Client error: 401

0 个答案:

没有答案