Want to send email from GoDaddy mail account in my Laravel project. But mail is not send and there is no error shown in log
file.
controller
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Mail;
use App\Mail\SendMail;
class HomeController extends Controller
{
public function estimation_form_submit_confirm()
{
Mail::send(new SendMail());
}
}
.env
MAIL_DRIVER=mail
MAIL_HOST=Hostdetails
MAIL_PORT=465
MAIL_USERNAME=info@domainName.com
MAIL_PASSWORD='abc123'
MAIL_ENCRYPTION=ssl
App\Mail\SenMail.php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Http\request;
class SendMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct()
{
}
public function build(request $request)
{
return $this->view('mail',['name'=>'raff'])->to('support@gmail.com')->from('info@domainName.com');
}
}
There is no error shown in my log file while I send mail. Anybody Help Please ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire