All the tutorials I think, including the official documentation show how to send emails using views.
How to send emails without any view? How does the system routine automatically?
All the tutorials I think, including the official documentation show how to send emails using views.
How to send emails without any view? How does the system routine automatically?
public function email()
{
Mail::send([], [], function ($message)
{
$message->to('[email protected]')
->subject('EMAIL TESTE AUTOMÁTICO')
->setBody('CORPO DA MENSAGEM DE EMAIL TESTE!!!');
});
return "email enviado";
}
The correct one would be to use the method raw
and not send
Mail::raw('CORPO DA MENSAGEM DE EMAIL TESTE!!!', function ($message) {
$message->to('[email protected]')
->subject('EMAIL TESTE AUTOMÁTICO')
});
See the documentation .