Since yesterday I have had problems sending emails with Lumen. I think I have followed all the steps in the documentation correctly, but unfortunately I cannot send anything. Moreover, no error is displayed (I have activated APP_DEBUG=true
), and I am sure that the credentials of the smtp server are correct. I also did composer require illuminate/mail
.
Here are my modifications in bootstrap/app.php (I have $app->withFacades();
uncommented).
Here is my build function content: return $this->view('emails.mailTemplate', ['message' => $this->message]);
.
And the line of code that ask to send mail: Mail::to("wewanthalflifethree@gmail.com")->send(new sendMail($destEmail, $subject, $message));
.
Did I do something wrong? :/
Thx in advance for help!
EDIT: I just noticed something, the code stop working when I send the mail. If I add an echo after Mail::send, it will be appear on the page.