Mail setup not working properly


#21

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-09-27 17:01:51.006

!MESSAGE

!STACK 0

org.apache.commons.mail.EmailException: Sending the email to the following server failed : mail.midea.com:465

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:74)

at com.kms.katalon.composer.execution.settings.MailSettingsPage$11.run(MailSettingsPage.java:418)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

Caused by: javax.mail.MessagingException: Exception reading response;

nested exception is:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)

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 more


#22

Hello @7362-Monster

Well I had the problem where jre that comes with katalon studio didn’t have certificate installed. So here are the steps that fixed my problem. Please not that I will not post how to do every step since it will take too long. You can google how to do every step, it should not be too complicated.

1. Disabled my antivirus
2. Allowed inbound and outbound mail ports on windows firewall (ports 465 and 25) *
3. Fetched the ssl certificate of mail server, using openssl
4. Imported certificate into keystore using keytool **
5. I Allowed less secure apps on my google account ***
6. Your email should work now
7. You should turn on your antivirus back on when you finish, or decide to create an exception for Katalon studio

IMPORTANT NOTES:
* - 465 and 25 are common used ports for email but it does’t have to be true in every case. Please check ports on your mail server.
** - You have to import them into the keystore of the JRE that Katalon studio is using. So you should import it into KatalonInstalationFolder\jre\lib\security\cacerts
*** - Only required if using gmail account

I hope that this can help you in solving your problem

Best regards :slight_smile:
Ismar


Emails Settings
#23

hi, @Ismar

I’m so sorry for the late reply.Thank you for your detailed guidance.

I solved my problem under your guidance. As you said,It was indeed problem with the certificates.

Thank you Ismar for all your help.

Best regards
Monster


#24

@7362-Monster

It was my pleasure :slight_smile:

Best regards
Ismar


#25

For gmail, I tried the below steps, and it worked fine for me.
Firstly, close and reopen Katalon studio, followed by your project.
Then, provide the settings exactly as mentioned in the documentation.

(better to copy + paste)

Now, Try different protocols, i.e, select SSL protocol and click Send test email, if it work’s, fine, else, try with selecting TLS protocol.


#26

Hi guys, I have the same issue but for Outlook 2016. Outlook setting says to me that my account is Microsoft Exchange type. I find smtp using nslookup but it doesn’t work.
Does anybody of you using outlook with Katalon?