Why my server can't connect to Gmail smtp?

October 29, 2015 7.8k views
Java Networking Debian DigitalOcean DNS

Hi, i just checked that i’m not in any blacklist and also i my firewall is opened. My java application connects to Gmail SMTP to send e-mails, but once i moved my app to Digital Ocean, the same code i always used cannot connect to SMTP Gmail saying connect timeout.

Any clue on what’s is happening?

I thought i was missing the Reverse DNS of my droplet but i already corrected that without success.

Thanks for helping.

1 comment
  • I had a similar problem, then I change the name of the host for the IP address. This resolved the problem.
    Change from ssl://smtp.googlemail.com to ssl://

2 Answers

Hello marciomalewschi

To curb a recent increase in abuse and SPAM, DO has an initial SMTP block on new accounts created in certain contexts. If you file a support ticket (https://cloud.digitalocean.com/support) the team should be able to lift that for you after some manual account verification.

Hello! I have similar problem…
GMAIl is not working in DO servers. But work in (same code) in the servers of other company.
I suppose it is problem of DO server settings. Please can you help me. Gmail settings:

Host name:



User name:


Protocol: SMTP
Aut…: true
Start TLS: true

Have another answer? Share your knowledge.