Sunday, October 22, 2017

Laravel 5.4+ (Important Note) Mail


  • make blade file



  • make controller





public function send(){Mail::send(['text'=>'mail'],
['name','shadhin'],function ($message)
{    $message->to('ownwebemail@gmail.com','To shadhin')
->subject('Test Email');    $message->
from('ownwebemail@gmail.com','shadhin');});    }
  • configure env file



MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=ownwebemail@gmail.com
MAIL_PASSWORD=20122013
MAIL_ENCRYPTION=tls

4.config route page




















Edit the APP_URL inside your .env to be
APP_URL=http://localhost:8000





No comments:

Post a Comment