Today we learn how to setup laravel mail configuration in
To set up our mail we need to open
.env file under root folder and edit these lines:
MAIL_DRIVER= MAIL_HOST= MAIL_PORT= MAIL_USERNAME= MAIL_PASSWORD= MAIL_ENCRYPTION=
look at the example below:
MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 MAIL_USERNAME= YOUR EMAIL ADDRESS (INCLUDED @GMAIL.COM) MAIL_PASSWORD= YOUR EMAIL PASSWORD MAIL_ENCRYPTION=ssl
You also have 2 optional setting you can add to your .env file if you like to:
MAIL_FROM_ADDRESS=[email protected] MAIL_FROM_NAME="CV. Irando website"
these options will set to your sent emails if you do not have default value for them in your codes.
Note: If your title is included space character you have to put your title inside