Email Configuration
You need to configure the following settings in your .env file
- MAIL_HOST: Your mail server host
- MAIL_PORT: Your mail server port
- MAIL_USERNAME: Your email id
- MAIL_PASSWORD: your email password
- MAIL_ENCRYPTION: If your MAIL_PORT=587 then MAIL_ENCRYPTION must be tls and if your MAIL_PORT=465 then it must be ssl
- MAIL_FROM_ADDRESS: Your Email Address
For Gmail server you need to do the following steps
If 2 Step Verification is Enabled:
If your 2 step verification is enabled in gmail account you need to do the following steps.
- Login into Gmail.
- Click on the "Google Account".
- Click Security -> App Passwords
- Select "Mail" as the app and "Other (Custom name)" as the device from the drop downs then click generate.
- New window open with your 16 character app password . (Kindly copy this and keep it safe).
- Know open your .env file and change the following setting
- MAIL_DRIVER=smtp
- MAIL_HOST=smtp.gmail.com
- MAIL_PORT=465
- [email protected]
- MAIL_PASSWORD=your-app-password
- MAIL_ENCRYPTION=ssl
- MAIL_FROM_ADDRESS: [email protected]
If 2 Step Verification is Disabled:
- Open your .env file and change the following setting
- MAIL_DRIVER=smtp
- MAIL_HOST=smtp.gmail.com
- MAIL_PORT=587
- [email protected]
- MAIL_PASSWORD=your-gmail-password
- MAIL_ENCRYPTION=tls
- MAIL_FROM_ADDRESS: [email protected]