mardi 20 août 2019

How to Fire Mail Using mailgun Laravel From Localhost

I am stuck to send mail using mailgun from localhost I am using

Route::get('send_test_email', function(){
    Mail::raw('Sending emails with Mailgun and Laravel is easy!', function($message)
    {
        $message->to('shahjad.ahmad89@gmail.com');
    });
});

and configure .env file

MAIL_DRIVER=mailgun
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=postmaster@test.demo.com
MAIL_PASSWORD=**********
MAILGUN_DOMAIN=test.demo.com
MAILGUN_SECRET=key-3d94c7e39983b*******74b9fd9

I am getting error

Client error: POST https://api.mailgun.net/v3/test.demo.com/messages.mime resulted in a 401 UNAUTHORIZED response: Forbidden

How to fix it Please give me any suggestion to resolved this issue



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/30jZsJn
via IFTTT

Aucun commentaire:

Enregistrer un commentaire