Email notification through Gmail: Connection Timeout to smtp.gmail.com:587
I get the following error [ERROR] Sending the email to the following server failed : smtp.gmail.com:587: Could not connect to SMTP host: smtp.gmail.com, port: 587: Connection timed out -> [Help 1] |
4 answers
Hi Victor,
According to https://support.google.com/a/answer/176600?hl=en The port for SSL connections is 465. 587 is for TLS connections. Cheers, Simon |
Hi Simon,
Thank you for your answer ! You're right. I've mixed the two. I tried again: <mailssl>true</mailssl> <mailport>465</mailport>and <mailssl>false</mailssl> <mailport>587</mailport>Both configurations hang for ~1 min when sending the mail, and then result in error:
[ERROR] Sending the email to the following server failed : smtp.gmail.com:587: Could not connect to SMTP host: smtp.gmail.com, port: 587: Connection timed out
I suspect that there is some port blocking in place, but I don't know how to work around it. I say this because I've tried to set the server to www.gmail.com : 80 and there was some response (that caused an error afterall) -- but at least there was some response from the remote server.
Thank you! Victor |
Hi Victor, to check if there is a firewall blocking your access to these ports, try the following command from a DOS window (on Windows) or a terminal window (Linux or Unix).
telnet smtp.gmail.com 587 You should see the response: 220 mx.google.com ESMTP c8sm40836399wjw.6 - gsmtp On Windows type "Ctrl+$" then "quit" to exit "telnet" On Linux and Unix type "Ctrl+]" then "quit" to exit "telnet" If you do not see the reply from google then something on your network is blocking the port. Ask your system administrator. Cheers, Simon Comments
Victor Rentea
commented Aug 18 '14, 5:29 a.m.
Unfortunately I don't have SSH access on the Jenkins server that runs the maven build :(
|
Sorry, you will have to talk to your server administrator, you will need access to the server that is contacting Google in order to debug this problem. If you can not have direct access, maybe your server administrator can run the commands; The server administrator will also know if there is a firewall setup on the server or between the server and the internet that could block these outgoing requests.
Cheers, Simon |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.