Question

sendemail on ubuntu timeout connection on gmail smtp

Posted March 14, 2014 19.6k views
Hey people, I am trying to use sendemail to test emails on my droplet on digital ocean and it is not working. I do the same command line on my machine and in other server hosted in linode. Both works. $ sendemail -f myemail@gmail.com -t otheremail@gmail.com -u subject -m "message" -s smtp.gmail.com:587 -o tls=yes -xu myemail@gmail.com -xp 'password' Mar 14 20:18:10 digitalocean sendemail[23681]: ERROR => Timeout while connecting to smtp.gmail.com:587 There was no response after 60 seconds. Can you help me?
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://209.85.233.16.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
13 answers
Does
telnet smtp.gmail.com 587
timeout too?
From my machine:

$ telnet smtp.gmail.com 587
Trying 74.125.137.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP m9sm30167065yha.2 - gsmtp

From my digital ocean droplet:

$ telnet smtp.gmail.com 587
Trying 74.125.131.108...
Trying 74.125.131.109...
Trying 2607:f8b0:400c:c03::6d...
telnet: Unable to connect to remote host: Network is unreachable

Yeap, timeout too...
Please open up a support ticket so we can look into it. Thanks!
From my linode account:

$ telnet smtp.gmail.com 587
Trying 74.125.196.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP 44sm32431237yhp.17 - gsmtp

Thanks Kamal, I am open the ticket right now.
I have the same issue trying to reach google and amazon ses SMPT services, it is annoying.
Same issue here. No idea what is going on. Can log in with Telnet, but sending mail times out.
same issue. last a week.
Same issue here. Any ideas when it will be resolved? Is there firewall or something?

Same for me…

Same problem.

Same here. Just opened a ticket.

Well, I just subscribed to this service to create a host for my domain and website and I am having this problem.

The primary purpose of my server is exactly hosting my email and it’s essential that it can send emails to Gmail since most of my clients have accounts there…

I can see this thread was created on March 14 and I wanted to ask for the people that were having problems if they still do… Because this is clearly a routing issue and supposedly it woulndn’t take months to solve.

tracepath smtp.gmail.com
1?: [LOCALHOST] pmtu 1500
1: 104.131.255.253 0.445ms
1: 104.131.255.253 0.499ms
2: 198.199.99.253 0.386ms
3: 192.241.164.250 0.593ms asymm 2
4: no reply
5: no reply
6: no reply
7: no reply

  • As a FYI for the next person with the same problem… I received a message telling me the SMTP connection is blocked on new accounts.

    Hopefully I’ve provided enough info to remove the block.

Submit an Answer