Setting Email for Forgot Password & Other application wide emails
Email functionality is used in some part of application like “Forgot Password”, “Offline Payment approval for SaaS module” and others from time-to-time.
During installation steps, you can set up email setting with all “SMTP” details or if you’re server support php-mail then you can use that too (php-mail is not recommended)
But if you have not setup it correctly then you can follow the below steps to do it:
- Open you .env file
- You will find the below configurations present there
- MAIL_DRIVER=smtp
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=
- MAIL_DRIVER=smtp
- Fill in the appropriate details, you can get in contact with your hosting provider for any of the values above.
- For example with Gmail it looks like below:
- MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=<your_gmail_email>
MAIL_PASSWORD=<your_gmail_password>
MAIL_ENCRYPTION=TLS - Some hosting disable port 587 and due to that email may not work, contact your hosting provider & they will enable it.
- MAIL_DRIVER=smtp
