If you need to use gmail try this. I have tested this on my local. it is working for me.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your_gmail_address@gmail.com
MAIL_PASSWORD=your_gmail_address_password
MAIL_ENCRYPTION=tls
MAIL_PRETEND = false
Optional
MAIL_FROM_ADDRESS = from@email.com
MAIL_FROM_NAME = Sender's Name
Additionally you can use mailtrap ( https://mailtrap.io ) which is very handy for development.
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME= your_mailtrap_username # This is auto generated one. you can find it once you create your mailtrap account
MAIL_PASSWORD=your_mailtrap_password # Again t his also auto generated one. you can find it once you create your mailtrap account
MAIL_ENCRYPTION=null
MAIL_PRETEND = false
MAIL_FROM_ADDRESS = from@email.com
MAIL_FROM_NAME = Sender's Name
Note : You may need to change mail.php ( config\mail.php ) to use MAIL_FROM_ADDRESS , MAIL_FROM_NAME , MAIL_PRETEND keys
mine
return [
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'from' => ['address' => env('MAIL_FROM_ADDRESS'), 'name' => env('MAIL_FROM_NAME')],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => env('MAIL_PRETEND', false),
];
Hope this will help you :)
Happy Coding.