0

I try to use mailgun and laravel 5.2 without success.

I created an account in mailgun.com. I validated the email adress and the phone number.

Here an axtract of what I see in mailgun.com :

enter image description here

In .env file, I entered that :

enter image description here

In services.php file, I have :

'mailgun' => [
    'domain' => env('MAILGUN_DOMAIN'),
    'secret' => env('MAILGUN_SECRET'),
],

And at least in mail.php file, I have :

  'driver' => env('MAIL_DRIVER', 'smtp'),

And to send my email i code :

Mail::send('emails/emailValidationInscription', [
            'personne' => $personne
        ]
        , function($message) use ($personne)
        {
            $message->to($personne->email);
            $message->subject('validation inscription');
        });

It does not work, I have this error :

cURL error 60: SSL certificate problem: unable to get local issuer certificate

What's the problem ?

Thanks for your answers.

Dominique

Dom
  • 2,984
  • 3
  • 34
  • 64
  • See this answer: http://stackoverflow.com/questions/28858351/php-ssl-certificate-error-unable-to-get-local-issuer-certificate/32095378#32095378 – Björn Mar 11 '17 at 18:49
  • Does this answer your question? [PHP - SSL certificate error: unable to get local issuer certificate](https://stackoverflow.com/questions/28858351/php-ssl-certificate-error-unable-to-get-local-issuer-certificate) – miken32 Dec 10 '21 at 21:40

2 Answers2

0

Thanks for your answers. I have the response.

The Laravel 5.2 official documentation explains that "mailgun" works with the Guzzle library "guzzlehttp/guzzle": "~5.3|~6.0".

But a lot of persons changed that to "guzzlehttp/guzzle": "~4.0".

I did this change and all works fine now.

halfer
  • 19,824
  • 17
  • 99
  • 186
Dom
  • 2,984
  • 3
  • 34
  • 64
-1

I believe you could add the following to config/mail.php:

'ssloptions' => [
    'verify_peer' => false,
    'verify_peer_name' => false,
]

And use it like that only in local environment.

user2094178
  • 9,204
  • 10
  • 41
  • 70