Katalon Studio v5.8 - It's time for the all-new API testing experience
Karthik D
Katalon Apprentice
05/15/2017

Email configuration issue

Dear Team,

I'm trying to send the result to email and configured the settings as specified for Gmail however it is showing the error "Unable to send email to following server: smtp.gmail.com:25. Please check configuration on your email server." when i click "Send test email"

My configuration details:

Host: smtp.gmail.com

Port: 587

UserName - My full gmail id

Password - My gmail password

Protocol - Tried with None, SSL, TLS. I could not see SMTP option.

Report Recipient - My gmail id

Please advice.

Thanks,

D Karthik

Upvote
Quote

Comments

  • Vinh Nguyen
    Katalon Moderator
    05/16/2017
    Hi there,

    Have you followed these guidelines on this page? https://docs.katalon.com/display/KD/How+to+configure+email+settings+in+Email+Preferences. There are some notes on last page which you need to set in order to send email successfully.
    Upvote
    Quote
  • Karthik D
    Katalon Apprentice
    05/16/2017
    Dear,

    Yes, i did the same configuration but it throws the error.

    Thanks

    D Karthik
    Upvote
    Quote
  • Vinh Nguyen
    Katalon Moderator
    05/16/2017
    Hi there,

    How about changing your port into 465 and try again?

    Thanks
    Upvote
    Quote
  • Karthik D
    Katalon Apprentice
    05/16/2017
    Yes, i did that as well.

    Regards,

    D Karthik
    Upvote
    Quote
  • Vinh Nguyen
    Katalon Moderator
    05/16/2017
    So can you post me your Katalon Studio logs, it’s available as .log file in .metadata folder, e.g ‘C:\4.5\config\.metadata\.log’

    Here is my try of sending email: http://prnt.sc/f8an3q

    Thanks
    Upvote
    Quote
  • Karthik D
    Katalon Apprentice
    05/16/2017
    Please find the screenshot of the error at http://prntscr.com/f8ast6 and log file screenshot at http://prntscr.com/f8au5a

    I'm unable to upload the log file as the prntscr website allows to upload only the image

    Thanks,

    D Karthik
    Upvote
    Quote
  • Karthik D
    Katalon Apprentice
    05/17/2017
    Dear,  Can you please advise me on above said email configuration issue?

    Thanks,

    D Karthik
    Upvote
    Quote
  • Vinh Nguyen
    Katalon Moderator
    05/17/2017
    Hi there,

    We are checking again. Can you confirm again from your side you've done the following configurations?
    In case you are using two-step authentication, please turn it off before using that email for configuration.

    For those who uses Gmail & Yahoo! Mail, please make sure you have already allowed low secure apps to access your account. Follow the guide here for Gmail users, or here for Yahoo! Mail users.
    Upvote
    Quote
  • Karthik D
    Katalon Apprentice
    05/17/2017
    Hi There,

    I allowed low secure apps to access the account and it works fine now. Thanks a lot.

    Questions -
    1) By changing the access security level to Low, it will be a risk either to our account or to the company (if we want to use company email id). In this case, is it possible to find any alternative way to send email without changing the security level?
    2) For SMTP, what is the protocol to be selected? I could see three options 1) None 2) TLS 3) SSL

    Thanks,
    D Karthik
    Upvote
    Quote
  • Antero Gasalho
    Katalon Apprentice
    08/02/2017
    Hi everyone !

    I also have the same problem, I try several port, no one worked...

    Could be a netprovider issue/problem?
    Upvote
    Quote
  • Erick Sarte 1
    Katalon Apprentice
    08/31/2017
    Getting the same error. Any updates on this question?
    Upvote
    Quote
  • Hanh Tran
    Katalon Ambassador
    09/01/2017
    Which Katalon Studio version you are using?
    Upvote
    Quote
  • Erick Sarte 1
    Katalon Apprentice
    09/01/2017
    Katalon Studio
    Version: 4.7.2
    Build: 3
    Upvote
    Quote
  • Erick Sarte 1
    Katalon Apprentice
    09/01/2017
    Downloaded the latest version as of the moment but the error is still there. I also enabled allow less secure apps. Sending of test email is still not successful.

    Version: 4.8.0   - (Windows 10 - 64bit)
    Build: 2

    https://www.screencast.com/t/hONet2s0

     
    Upvote
    Quote
  • Erick Sarte 1
    Katalon Apprentice
    09/05/2017
    Any other things i need to change or update? I also enabled pop and imap in the google account being used aside from the enable less secure apps.
    Upvote
    Quote
  • Erick Sarte
    Katalon Apprentice
    09/07/2017

    I'm also encountering this issue. I've tried yahoo and google accounts but both are not working. I also enabled both accounts to also apps that are less secure. Please see screenshot.
    https://www.screencast.com/t/xkTqwwQFc

    Katalon Version:
    Katalon Studio
    Version: 4.8.0
    Build: 2

    Upvote
    Quote
  • Hanh Tran
    Katalon Ambassador
    09/08/2017

    Can you copy for me Katalon Studio logs? It is available as .log file /config/.metadata/.log file

    Upvote
    Quote
  • Erick Sarte
    Katalon Apprentice
    09/08/2017

    Thu Sep 07 23:40:20 CST 2017
    org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.mail.yahoo.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.sendSummaryMail(MailUtil.java:129)
    at com.kms.katalon.execution.launcher.ReportableLauncher.sendReportEmail(ReportableLauncher.java:157)
    at com.kms.katalon.execution.launcher.ReportableLauncher.sendReport(ReportableLauncher.java:123)
    at com.kms.katalon.execution.launcher.ReportableLauncher.preExecutionComplete(ReportableLauncher.java:80)
    at com.kms.katalon.execution.launcher.ProcessLauncher.onWatchdogComplete(ProcessLauncher.java:171)
    at com.kms.katalon.execution.launcher.LaunchWatchdog.notifyProcessTerminated(LaunchWatchdog.java:135)
    at com.kms.katalon.execution.launcher.LaunchWatchdog.run(LaunchWatchdog.java:65)
    at java.lang.Thread.run(Thread.java:745)
    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)
    ... 9 more
    Caused by: 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 sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:928)
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
    at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
    at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
    at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
    ... 17 more
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    at sun.security.validator.Validator.validate(Validator.java:260)
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
    ... 29 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
    ... 35 more

    Upvote
    Quote
  • Vinh Nguyen
    Katalon Moderator
    09/09/2017
    edited September 2017

    This is the root cause:
    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

    Some workaround solutions here:
    1. Check if you have any antivirus application which is blocking Katalon Studio application
    https://stackoverflow.com/questions/17098281/my-java-program-stopped-sending-emails-using-my-gmail-account

    OR

    1. Download InstallCert.java in this place: https://github.com/escline/InstallCert

    Compile it using this Windows command line:

    javac InstallCert.java

    Execute the following windows command line one by one:

    java InstallCert
    keytool -exportcert -alias -1 -keystore jssecacerts -storepass changeit -file .cer
    keytool -importcert -alias .net -keystore "jre\lib\security\cacerts" -storepass changeit -file .cer

    Example:
    java InstallCert katalon.com

    keytool -exportcert -alias staging.shoutforgood.net-1 -keystore jssecacerts -storepass changeit -file kataloc.com.cer

    keytool -importcert -alias staging.shoutforgood.net -keystore "D:\Katalon_Studio_Windows_64-4.5\jre\lib\security\cacerts" -storepass changeit -file katalon.com.cer

    Upvote
    Quote
  • Vibha Luthra
    Katalon Apprentice
    04/30/2018
    Tried the above step. Still unable to send mail.
    Upvote
    Quote
  • Kamran Zaman
    Katalon Apprentice
    05/21/2018
    Same issue with email. See log attached. 
    .log 871.9K
    Upvote
    Quote
  • David Edmondson
    Katalon Ambassador
    05/21/2018
    edited May 21
    Try this: If you have a GMail account, use the settings in my post for the Host and Port, and your GMail address and password.  Set the Recipients to your Yahoo Email account.  Also, you need to click this link
    https://myaccount.google.com/security ), and log in with your GMail credentials in order to set "Apps with account access" - "Allow less secure apps:" to "ON"...

    Then we will know that there are no issues with your PC/Network's firewall or any AntiVirus software...

    Upvote
    Quote
  • Kamran Zaman
    Katalon Apprentice
    05/22/2018
    Hi David, 

    Tried the above and still receiving the same message to do with "Unable to send email to following server: smtp.gmail.com:25.

    I have also attached the logs. 

    Many thanks. 

    Kam.
    Upvote
    Quote
  • Kamran Zaman
    Katalon Apprentice
    05/22/2018
    Could not attach a second log so here is the error from the log.........

    !ENTRY org.eclipse.e4.ui.workbench 4 0 2018-05-22 10:35:06.127
    !MESSAGE 
    !STACK 0
    org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com: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:74)
    at com.kms.katalon.composer.execution.settings.MailSettingsPage$11.run(MailSettingsPage.java:390)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
    Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, 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 more
    Caused 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
    Upvote
    Quote
  • David Edmondson
    Katalon Ambassador
    05/23/2018
    Kamran,

    Just to confirm, you have clicked this link
    https://myaccount.google.com/security ), and logged in with your GMail credentials in order to set the "Apps with account access" - "Allow less secure apps:" attribute to a value of "ON"...

    If you have not done this, the GMail SMTP Server will not allow your GMail account to send outgoing emails...
    Upvote
    Quote
  • Kamran Zaman
    Katalon Apprentice
    05/23/2018
    David, Yes. I have done that. Still cannot get this to work. Any ideas. 
    Upvote
    Quote
  • Kamran Zaman
    Katalon Apprentice
    05/23/2018
    @"David Edmondson"

    Upvote
    Quote
  • David Edmondson
    Katalon Ambassador
    05/23/2018
    edited May 23
    Which Operating System is the Katalon Studio v5.4.1 application running on?

    Windows, Linux, macOS, other?

    Try to "Ping" the GMail SMTP Server to ensure that your network path is clear...

    At a command prompt, type ping smtp.gmail.com...

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

    C:\Users\dkedmondson>ping smtp.gmail.com

    Pinging gmail-smtp-msa.l.google.com [2607:f8b0:400e:c03::6d] with 32 bytes of data:
    Reply from 2607:f8b0:400e:c03::6d: time=50ms
    Reply from 2607:f8b0:400e:c03::6d: time=47ms
    Reply from 2607:f8b0:400e:c03::6d: time=54ms
    Reply from 2607:f8b0:400e:c03::6d: time=48ms

    Ping statistics for 2607:f8b0:400e:c03::6d:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 47ms, Maximum = 54ms, Average = 49ms

    C:\Users\dkedmondson>

    Upvote
    Quote
  • Kamran Zaman
    Katalon Apprentice
    05/29/2018
    I am receiving Request Timed Out. 
    4 packets sent and 0 packets received.

    @"David Edmondson"

    Upvote
    Quote
  • David Edmondson
    Katalon Ambassador
    05/29/2018
    Kamran,

    Gmail needs to be able to respond to your Ping command in order for for you to know that Katalon Studio has a chance to be able to connect to the GMail Server on Port 465...

    You need to resolve this Ping issue with your Network Team (Open Port 465 in your company's firewall) /Desktop Support Team (Ensure no local virus software is blocking Port 465 / Ensure no local Firewall is blocking Port 465)...
    Upvote
    Quote
Sign In or Register to comment.