Of course you get an empty response, you don't return anything.
You probably should redirect with a status code, or at least send some response back.
I am trying to send email from Laravel. My settings of .env file is as below.
MAIL_DRIVER=sendmail MAIL_HOST=localhost MAIL_PORT=465 MAIL_USERNAME=/cpanel webmail created/ MAIL_PASSWORD=password MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS=[email protected] MAIL_FROM_NAME="[email protected]" MAIL_TIMEOUT=600 MAIL_DEBUG=true
My current function I am going call the route is as follow. public function emailTest() { $receiver_email = "[email protected]"; $greeting = "HELLO. This is mail test from email server"; Mail::to($receiver_email)->send(new TestMail($greeting)); }
//Test Mail.php
Please or to participate in this conversation.