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

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

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.

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


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.

Solution

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

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

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

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