我安装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