Hello,
I am trying to send an email using Laravel 5.7, and I had some problems.
I wrote a view for my email. I then send the email rendered by the Controller, as follows:
Mail::send('admin.eventos.pessoa', ['pessoa' => $pessoa], function ($message) use ($pessoa){
$message->to($pessoa->email);
});
I configured my email in Laravel as follows, the way I always do in test applications:
MAIL_DRIVER=smtp
MAIL_HOST=mx1.hostinger.com.br
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=senha
MAIL_ENCRYPTION=tls
In addition, I configured the mail.php file, to resolve the previous error "stream_socket_enable_crypto (): SSL operation failed with code 1. OpenSSL Error messages: * error: 1416F086: SSL routines: tls_process_server_certificate: certificate verify failed ", as described in this English OS issue .
'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],
Well, then I call the controller method that calls that first excerpt that I put in the question. This controller is called via Post. But instead of the email being sent, I get this in response:
Swift_TransportException thrown with message "Expected response code 354 but got code" 554, with message "554 5.5.1 Error: no valid recipients ""
What can this be?
What I've already tried:
They all did not work out.
I appreciate the answers.