AWS SES - Connection time-out on port 25



Our AWS account ID is 592296619356. We have a Java based web-application running on an EC2 instance in Mumbai which sends emails through SMTP server at Ireland - , port 25 (because SES was not available in Mumbai when this account/application was set up).

The emails were going out fine till recently but now we cannot connect to the SMTP server at all and are getting connection timed out errors.

Exception: com.sun.mail.util.MailConnectException: Couldn't connect to host, port:, 25; timeout -1;

I tried all the troubleshooting tips at and I am not able to telnet at all which suggested a network issue?

I tried by disabling firewall, adding outbound port 25 and inbound 1024-65535 in our security-group, network acl etc. but it is still unable to connect.
nmap shows that 25 is open on our ec2 and on the smtp server it shows as 25/tcp filtered smtp.

Could you please point me towards a solution to this issue? (Email is an integral part of our application registration/status etc. and without it a user cannot proceed).

Thanks a lot.

asked 4 years ago965 views
3 Answers

For anybody still looking into this thread - I found some helpful tips at
Changing the port to 587 and using explicit tls seems to have resolved the issue.

answered 4 years ago

We also started to experience similar behavior. We were using port 465 though. This was happening to about 10% of outcoming mails.

We implemented a retry mechanism. If sending fails it will be tried again in 1 minute. This solved this issue (for now).

I've also tried to switch to port 587 - but the outcome is the same as on 465.

answered 4 years ago

Hello did you ever get to the bottom of this? I'm suffering through the same issue here

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions