Unable to send email for most times (config/.metadata/.log is attached)

Hi there,

Katalon cannot send email for most times. Before I install Katalon, the server can telnet to email server. After I config Katalon to send email, the server cannot connect to the email server for most times. Sometimes it can connect to the email server again.

I have read discussion, such as https://forum.katalon.com/discussion/1925/email-configuration-issue/p1
https://forum.katalon.com/discussion/4310/katalon-unable-to-sent-reports-to-desired-email-address/p1. But I think my problem is different and strange.


Here is the log in config/.metadata/.log

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-01-15 08:57:03.943!MESSAGE !STACK 0org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.mailgun.org:25	at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1421)	at org.apache.commons.mail.Email.send(Email.java:1448)	at com.kms.katalon.execution.util.MailUtil.sendTestMail(MailUtil.java:71)	at com.kms.katalon.composer.execution.settings.MailSettingsPage$11.run(MailSettingsPage.java:379)	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.mailgun.org, port: 25;  nested exception is:	java.net.ConnectException: Connection timed out: connect	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)	at javax.mail.Service.connect(Service.java:297)	at javax.mail.Service.connect(Service.java:156)	at javax.mail.Service.connect(Service.java:105)	at javax.mail.Transport.send0(Transport.java:168)	at javax.mail.Transport.send(Transport.java:98)	at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411)	... 4 moreCaused by: java.net.ConnectException: Connection timed out: connect	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)	at java.net.Socket.connect(Socket.java:589)	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:230)	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)	... 11 more

Snip20180115_80.png

sorry for the messy config/.metadata/.log.

I attach the screenshot here since I cannot edit my question

Snip20180115_81.png

@“Vinh Nguyen”

I might have found the reason for this problem.

Actually I configured the port 587 for my smtp server, it showed the problem “cannot connect to port 25”. I don’t know why Katalon wants to connect to port 25 even if what I have configured is port 587.

Usually, port 25 is not recommended to use because of spam emails. Some ISPs or Cloud Hosting Providers ban this port.

So is there a way by which Katalon sends email without using port 25?

Reference: http://blog.mailgun.com/25-465-587-what-port-should-i-use/

Snip20180122_12.png