Okay
  Print

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
    1. MAIL_DRIVER=smtp
    2. MAIL_HOST=smtp.gmail.com
    3. MAIL_PORT=465
    4. MAIL_USERNAME=youraccount@gmail.com
    5. MAIL_PASSWORD=your-app-password
    6. MAIL_ENCRYPTION=ssl
    7. MAIL_FROM_ADDRESS: youraccount@gmail.com

If 2 Step Verification is Disabled:

  • Open your .env file and change the following setting
    1. MAIL_DRIVER=smtp
    2. MAIL_HOST=smtp.gmail.com
    3. MAIL_PORT=587
    4. MAIL_USERNAME=youraccount@gmail.com
    5. MAIL_PASSWORD=your-gmail-password
    6. MAIL_ENCRYPTION=tls
    7. MAIL_FROM_ADDRESS: youraccount@gmail.com