MAIL_DRIVER should be = "mailgun" and make sure MAIL_PRETEND=false. Also, set your appropriate MAIL_HOST
Laravel Mail not working and php function mail() does
Hey guys,
I had this issue last month while testing another app on a DigitalOcean VPS then I changed the mail driver to Mailgun.
Right now I just moved a new project from testing server (where everything was working OK) to a production server. The issue is that on the production server Laravel Mail doesn't work and doesn't want to send email.
So I tested the PHP mail() function and it works perfect.
I tested the next configurations and did not work.
.env
MAIL_DRIVER=mail
app/mail.php
'driver' => 'mail'
I don't receive any errors and when executing
dd(Mail::failures());
I get an array with the email that wasn't sent.
Is this a server issue, that doesn't let Laravel to execute the mail function or is this a Laravel issue?
Please or to participate in this conversation.