Forum Discussion

N_P's avatar
N_P
Occasional Contributor
3 years ago

java.net.ConnectException: Connection timed out: connect

ERROR: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: xxxxx.xxx.xxx, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection timed out: connect

 

Facing above exception while sending mail through adding Send Mail step for test case. Mail is not getting triggered after test step pass of fail. Kindly help to resolve this issue.

 

3 Replies

  • richie's avatar
    richie
    Community Hero
    Hey N_P,

    If youre getting a socketException, the issue is something pretty fundamental....something like wrong TLS/SSL settings or incorrect http/https.

    i.e. are you trying to connect via http when it should be https or the other way round?

    Cheers,

    Rich
    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thanks Rich!

       

      Hi N_P! Does the suggestion help? 

      • sonya_m's avatar
        sonya_m
        SmartBear Alumni (Retired)

        Hi N_P , looks like you replied to the email notification, so your reply wasn't posted here. Let me quote:

         

        >>

        Thanks Rich. The issue got resolved, I used one groovy script to send Email.

        Thanks for your response.

        <<

         

        Could you share the script with the community, if possible? Thank you!