使用mailgun发送电子邮件时出现Laravel 5错误

时间:2016-04-21 03:48:11

标签: laravel-5 mailgun

我尝试使用mailgun驱动程序发送电子邮件。这是我的配置邮件

  'driver' => 'mailgun',
'host' => 'smtp.mailgun.org',
'port' => 587,
'from' => ['address' => "azharnabil@yahoo.com", 'name' => "xxxx"],
'encryption' =>  'tls',
'username' => 'postmaster@sandboxf8da4d0d440a430b94a7052df474cd66.mailgun.org',
'password' => '2c565102ab5bef1b562c2ffbfe3e137c',
'sendmail' => '/usr/sbin/sendmail -bs'

这是我的配置服务

'mailgun' => [
        'domain' => 'sandboxf8da4d0d440a430b94a7052df474cd66.mailgun.org',
        'secret' =>'****************************',
    ],

路线

Route::get('/send','Front@sendM');

在控制器中

public function sendM(Request $request)
    {
        Mail::raw('Laravel with Mailgun is easy!', function($message)
        {
            $message->to('azharnabil013@yahoo.com');
        });

        return "Your email has been sent successfully";
    }

但我发现了这个错误

hoops, looks like something went wrong.

1/1
RequestException in CurlFactory.php line 187:
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

请任何人帮助我,

0 个答案:

没有答案