Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Setting up Gmail

    General Discussion
    2
    3
    259
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sajanojha last edited by

      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
      MAIL_DRIVER=SMTP
      MAIL_HOST=smtp.gmail.com
      MAIL_PORT=465
      MAIL_USERNAME=test@gmail.com
      MAIL_PASSWORD=test
      MAIL_ENCRYPTION=SSL

      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 smtp.site.com :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?
      thanks

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @sajanojha,

        Try to do these things,

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

        If possible restart your web server.

        1 Reply Last reply Reply Quote 0
        • S
          sajanojha last edited by

          @devansh-webkul said in Setting up Gmail:

          php artisan config:clear

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post