Laravel env and mailing info

930 Views Asked by At

I want to know is that possible I use one of my host emails instead of gmail in laravel or not?

Issues

  1. When I use Gmail info as mailing

    MAIL_DRIVER=smtp
    MAIL_HOST=smtp.gmail.com
    MAIL_PORT=465
    [email protected]
    MAIL_PASSWORD=MAIL_PASSWORD
    MAIL_ENCRYPTION=ssl
    [email protected]
    MAIL_FROM_NAME="CUSTOM_NAME"
    

it works.

But when I try to use my host email it doesn't

MAIL_DRIVER=smtp
MAIL_HOST=HOSTING_SERVER
MAIL_PORT=HOST_PORT
MAIL_USERNAME=MY_HOST_EMAIL
MAIL_PASSWORD=MY_HOST_EMAIL_PASSPORD
MAIL_ENCRYPTION=null
  1. Even with providing sender info in my env file emails always send by gmail address to users and not provided email address.

    [email protected]
    MAIL_FROM_NAME="CUSTOM_NAME"
    

Any idea?

0

There are 0 best solutions below