Setting up Gmail

  • Hello team, I am trying to set up an email (Gmail) however I am having an issue.
    My email configuration is like this in the .env file
    [email protected]

    I get an error when I run the following command

    php artisan config:cache
    Configuration cache cleared!
    In LoadConfiguration.php line 49:
      date_default_timezone_set(): Timezone ID '' is invalid

    My timezone is set to APP_TIMEZONE=EDT in my .env file

    and when I try to send an email, I get the following error

    Error! Connection could not be established with host :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known.

    I have also turned on less secure app access;

    Can you please guide what I am missing?

  • Hi @sajanojha,

    Try to do these things,

    • Run php artisan cache:clear.
    • Run php artisan config:clear.

    If possible restart your web server.

  • @devansh-webkul said in Setting up Gmail:

    php artisan config:clear

    didn't work what you suggested, I was able to configure it.

Log in to reply