# Mail setup not working properly

**URL:** <https://forum.katalon.com/t/mail-setup-not-working-properly/10961>\
**Category:** Bug Report\
**Tags:** katalon-studio, bugs-report\
**Created:** [May 16, 2018, 10:02am UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961 "2018-05-16T10:02:12Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Monster](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/monster/32/1500_2.png) [@Monster](https://forum.katalon.com/u/Monster)\
**Post date:** [September 27, 2018, 10:13am UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/21 "2018-09-27T10:13:00Z")

</div>

!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](http://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

---

<div class="post-metadata">

**Author:** ![Ismar](https://avatars.discourse-cdn.com/v4/letter/i/3ab097/32.png) [@Ismar](https://forum.katalon.com/u/Ismar)\
**Post date:** [October 1, 2018, 8:04am UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/22 "2018-10-01T08:04:19Z")

</div>

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 🙂  
Ismar

---

<div class="post-metadata">

**Author:** ![Monster](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/monster/32/1500_2.png) [@Monster](https://forum.katalon.com/u/Monster)\
**Post date:** [October 15, 2018, 3:02am UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/23 "2018-10-15T03:02:12Z")

</div>

hi, @[Ismar](http://forum.katalon.com/profile/6952/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

---

<div class="post-metadata">

**Author:** ![Ismar](https://avatars.discourse-cdn.com/v4/letter/i/3ab097/32.png) [@Ismar](https://forum.katalon.com/u/Ismar)\
**Post date:** [October 15, 2018, 2:33pm UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/24 "2018-10-15T14:33:11Z")

</div>

@7362-Monster

It was my pleasure 🙂

Best regards  
Ismar

---

<div class="post-metadata">

**Author:** ![Vidyasagar\_Sakaray](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@Vidyasagar\_Sakaray](https://forum.katalon.com/u/Vidyasagar_Sakaray)\
**Post date:** [October 16, 2018, 10:47am UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/25 "2018-10-16T10:47:41Z")

</div>

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.

> **[Emails Settings](https://docs.katalon.com/katalon-studio/docs/emails-settings.html#configure-email-settings-in-email-preferences)**
>
> Send test email button only available once Mail Server Settings and Recipients are filled correctly. These settings allow you to define global email configurations to be used in other features...

(better to copy + paste)

- Host: _[smtp.gmail.com](http://smtp.gmail.com/ "Link: http://smtp.gmail.com/")_
- Port: _465_
- Username: _Your full Gmail address (e.g. [yourusername@gmail.com](mailto:yourusername@gmail.com))._
- Password: Your Gmail password.
- Then enter the recipients email.

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.

---

<div class="post-metadata">

**Author:** ![Robert\_C](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Robert\_C](https://forum.katalon.com/u/Robert_C)\
**Post date:** [February 6, 2019, 3:23pm UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/26 "2019-02-06T15:23:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bsherman](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bsherman](https://forum.katalon.com/u/bsherman)\
**Post date:** [August 29, 2019, 9:11pm UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/27 "2019-08-29T21:11:32Z")

</div>

Hello!  
I just want to confirm that problem still exists in  
Version: 6.3.3  
Build: 11  
If you set the “Protocol” to “None”, email mechanism disregards the port number you set in “Port” field, and always tries to contact SMTP server on port 25.

I am trying to use free SMTP service, which uses non standard port (587), and thus can’t ever send an email.  
It would be great if you solve that issue in one of upcoming updates.  
Thank you!

---

<div class="post-metadata">

**Author:** ![bolson](https://avatars.discourse-cdn.com/v4/letter/b/c77e96/32.png) [@bolson](https://forum.katalon.com/u/bolson)\
**Post date:** [September 5, 2019, 10:13pm UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/28 "2019-09-05T22:13:58Z")

</div>

As of 8/30/19, I am now unable to send emails over [smtp.gmail.com](http://smtp.gmail.com); whether I set Port 25, 587, or 465; whether I set authentication to TLS, SSL, or None.  
I also edited the “execution.properties” file inside the Project folder, to ensure Port #s were being updated as expected.  
(Previous working settings were [smtp.gmail.com](http://smtp.gmail.com), Port 25; authentication TLS.)

Is anyone aware of a recent policy change, either on Katalon’s or Gmail’s part?  
Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [August 31, 2020, 12:30pm UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/29 "2020-08-31T12:30:36Z")

</div>

Automatically bumped on August 31, 2020, 12:30pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [August 30, 2021, 8:43am UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/30 "2021-08-30T08:43:03Z")

</div>

Automatically bumped on August 30, 2021, 8:43am UTC



---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [August 30, 2021, 9:38am UTC](https://forum.katalon.com/t/mail-setup-not-working-properly/10961/31 "2021-08-30T09:38:06Z")

</div>

Closed on August 30, 2021, 9:38am UTC

i closed this as it is inactive

[Previous page](https://forum.katalon.com/t/mail-setup-not-working-properly/10961.md?page=1)
