Hello,

We have a problem sending emails using osTicket with a Google business account. The account has no app password, has Two-Step Verification disabled, and has Less Secure App Access enabled. We have tried with ss:// and with ports 587 and 465, but it does not work with either.

Failed to connect to smtp.gmail.com:587 [SMTP: Failed to connect socket: Permiso denegado (code: -1, response: )]

I will appreciate your help.

![
](https://)

    Monicml

    I would encourage you to confirm you can telnet to that host and port from the webserver.

    Cheers.

    Thanks for the reply.

    We telnetted to the GMAIL server and port 587 from the server where the OSTicket is installed, and we can connect without problems, the connection is maintained. But when we use port 587 to configure the mail on the OSTicket, it gives the same error message.

    When we telnet from port 465 it connects and, after aprox 20 seconds, it disconnects. The server is open for all destinations all ports in the Firewall.

    I am attaching the image of the test we did.

    Do you have any idea what could be happening?

      Monicml

      Do you have a self-signed certificate or something on your webserver?

      Cheers.

      Monicml

      Then I’m unsure why this is occurring. You’ll need to review all the logs on your server to see where it’s failing.

      Cheers.

      10 months later

      I have the same error: " Failed to connect to smtp.gmail.com:587 [SMTP: Failed to connect socket. "
      I have tried several email providers and the problem persists. If anyone found the solution I need your help.

        Write a Reply...