1273
Views
10
Comments
Solved
Error: A connection attempt failed because the connected party did not properly
Question

Hi Everyone,


I face the issue about when sending e-mail from an application and there are logs about:


Error sending email 2827: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <EmailSeverIP>:<Port>    at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at OutSystems.HubEdition.SMTP.SendMail.SMTPMail.SendMail()


Some e-mail was sent successfully, but some were send delayed.


Does anyone found this issue?

Would you please give me the suggestion?


Thank you very much & Best Regards

2020-09-21 08-42-47
Vincent Koning
Solution

We had this exact same issue just a few weeks ago. The first ~5 mails where send instantaneously, all others where delayed. We are using the Hosted version of OutSystems.

The issue lied in the firewall in AWS that OutSystems is using. All mail send over port 25 is being throttled. Contact support and ask them to remove this blockade. 

An alternative, perhaps quicker solution is not using port 25 (SMTP) but port 587 or 465 if your mail provider supports this. These isn't a throttling rule on these ports.

2024-07-05 14-16-55
Daniël Kuhlmann
Ā 
MVP

Hi Film,

How did you setup your email SMTP? with Google? Past experiences of peer OutSystems developers show that setting up Gmail as SMTP has some challenges. Maybe you can try another stmp server.

For more info see:

https://success.outsystems.com/Support/Personal_Environment/How-to_send_emails_from_your_personal_environment

https://www.outsystems.com/forums/discussion/18791/gmail-smtp-not-working-in-personal-environment/

Regards,

Daniel

2017-11-07 08-06-37
Film

Daniƫl Kuhlmann wrote:

Hi Film,

How did you setup your email SMTP? with Google? Past experiences of peer OutSystems developers show that setting up Gmail as SMTP has some challenges. Maybe you can try another stmp server.

For more info see:

https://success.outsystems.com/Support/Personal_Environment/How-to_send_emails_from_your_personal_environment

https://www.outsystems.com/forums/discussion/18791/gmail-smtp-not-working-in-personal-environment/

Regards,

Daniel


Hi Daniel,


Thank you very much for your kindly help.

I didn't use Gmail as SMTP. My email server is an internal mail server.

I have allowed the firewall rule to connect with an OutSystems cloud already.
Some email was sent as normal, but there is some email was sent delayed with that error.


I have opened a case with OutSystems support team, but there is not update much more than I have to check firewall port.


Then I try to open this case in a community, if there is anyone found this same issue.


Best Regards.

2023-10-06 09-22-20
Tiago Bernardo
Champion

Hi!

I am currently facing the same problem, with the error:

Error sending email 8571: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <email-server>:<port>    at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)

Some emails are sent immediately without error, some get this error. With the retry mechanism of the OutSystems platform, eventually, all emails are sent with success.

Because of this problem, sending a batch of more or less 175 emails takes 8 hours!

I have also opened a support case with OutSystems but until now not much success getting help to solve this problem.


Film, were you able to solve the problem?


Thanks,

--Tiago Bernardo


2020-09-21 08-42-47
Vincent Koning
Solution

We had this exact same issue just a few weeks ago. The first ~5 mails where send instantaneously, all others where delayed. We are using the Hosted version of OutSystems.

The issue lied in the firewall in AWS that OutSystems is using. All mail send over port 25 is being throttled. Contact support and ask them to remove this blockade. 

An alternative, perhaps quicker solution is not using port 25 (SMTP) but port 587 or 465 if your mail provider supports this. These isn't a throttling rule on these ports.

2023-10-06 09-22-20
Tiago Bernardo
Champion

Thank you Vincent for the quick and helpful answer.

We are also using OutSystems in the cloud, so it seems to match with the problem you had.

Soon, I will try both solutions (1-change the port, 2-ask for removing the throttling rule from the firewall) and reply here with the results.

--Tiago Bernardo

2023-10-06 09-22-20
Tiago Bernardo
Champion

Hi!

Just to inform that we were able to solve our problem by starting to use port 587, instead of port 25, for the configuration for the SMTP server. Emails were successfully sent in mater of minutes instead of hours!

We did not try to solve the problem by contacting OutSystems support so that the throttling rule on port 25 could be removed, as the solution to just change to start using port 587 was much simpler and possible to use.

Thanks again Vincent Koning for the precious tip on how to solve the problem!

--Tiago Bernardo

2020-09-21 08-42-47
Vincent Koning

Hi Tiago,

Nice to hear that my contribution has lead to your solution. If you like to, please mark my answer as solution.

Best,

Vincent

2023-10-06 09-22-20
Tiago Bernardo
Champion

I would have already marked your answer as the solution but I am not able to do that as I am not the creator of the topic.

--Tiago Bernardo

UserImage.jpg
Kevin Niasta

Hi All, need your help. My email configured using MailEnable application, and opened with Thunderbird mail, already set the email using port 587, when trying to send an email, still got an error.


A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <IP Address>

Need your help. Thank you.

2024-07-05 14-16-55
Daniël Kuhlmann
Ā 
MVP

Kevin,

You are asking a question in an old thread from more than a year ago. Best practice is you create a new question, you can refer in it to this discussion. That way you can mark any reply that help you fixed your problem as a solution as you are the original post.

So please, create a new post with your question, then after that I will delete it in this discussion.

Regards,

Daniel


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.