Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6808657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:58:59+00:00 2026-05-26T19:58:59+00:00

I have the following problem. I have a Seam web application which features e-mail

  • 0

I have the following problem. I have a Seam web application which features e-mail composition and sending using Javamail. The application sends mail just fine in my local JBoss application server, but it doesn’t work on the JBoss server installed in my myhosting.com VPS. I read that the issue may be because the web server or the URL to which I’m trying to connect does not have a valid certificate from an authorized CA, but I run an utility (http://cold-caffein.blogspot.com/2011/07/looks-like-article-no-more-unable-to.html) that lets me verify the certificates and they appear to be fine (I’m connecting to Gmail).

The relevant code for setting Session properties follows:

props.put("mail.smtp.auth", "true");
props.setProperty("mail.smtp.starttls.enable", "true");

I read that another cause for the issue could be using mail.smtp.starttls.enable set to true, but the code doesn’t work at all (in my local server or in the VPS) if I omit the second line or set the property to false.

I don’t know if the problem has something to do with the mail2web mail service that myhosting offers (look at line 9 in both logs I’m providing below, it’s where things start going different). Here are the local Javamail log and the VPS’ server log (the latter shows the error I’m getting):

Local log:

18:57:31,129 INFO  [STDOUT] DEBUG: setDebug: JavaMail version 1.4ea
18:57:31,227 INFO  [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
18:57:31,383 INFO  [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
18:57:31,384 INFO  [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
18:57:31,384 INFO  [STDOUT] DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
18:57:31,677 INFO  [STDOUT] 220 mx.google.com ESMTP c8sm4881699yhm.14
18:57:31,677 INFO  [STDOUT] DEBUG SMTP: connected to host "smtp.gmail.com", port: 25
18:57:31,680 INFO  [STDOUT] EHLO SOFMANSERVER
18:57:32,088 INFO  [STDOUT] 250-mx.google.com at your service, [200.25.201.121]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250 PIPELINING
18:57:32,088 INFO  [STDOUT] DEBUG SMTP: Found extension "SIZE", arg "35882577"
18:57:32,088 INFO  [STDOUT] DEBUG SMTP: Found extension "8BITMIME", arg ""
18:57:32,088 INFO  [STDOUT] DEBUG SMTP: Found extension "STARTTLS", arg ""
18:57:32,088 INFO  [STDOUT] DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
18:57:32,088 INFO  [STDOUT] DEBUG SMTP: Found extension "PIPELINING", arg ""
18:57:32,088 INFO  [STDOUT] STARTTLS
18:57:32,212 INFO  [STDOUT] 220 2.0.0 Ready to start TLS
18:57:32,803 INFO  [STDOUT] EHLO SOFMANSERVER
18:57:33,829 INFO  [STDOUT] 250-mx.google.com at your service, [200.25.201.121]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH
250-ENHANCEDSTATUSCODES
250 PIPELINING
18:57:33,829 INFO  [STDOUT] DEBUG SMTP: Found extension "SIZE", arg "35882577"
18:57:33,829 INFO  [STDOUT] DEBUG SMTP: Found extension "8BITMIME", arg ""
18:57:33,829 INFO  [STDOUT] DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH"
18:57:33,829 INFO  [STDOUT] DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
18:57:33,829 INFO  [STDOUT] DEBUG SMTP: Found extension "PIPELINING", arg ""
18:57:33,829 INFO  [STDOUT] DEBUG SMTP: Attempt to authenticate
18:57:33,829 INFO  [STDOUT] AUTH LOGIN
...

and mail is sent sucessfully.

VPS log:

2011-10-26 19:54:10,290 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG: setDebug: JavaMail version 1.4ea
2011-10-26 19:54:10,292 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
2011-10-26 19:54:10,335 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: useEhlo true, useAuth true
2011-10-26 19:54:10,335 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: useEhlo true, useAuth true
2011-10-26 19:54:10,335 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
2011-10-26 19:54:10,418 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) 220 xsmtp05.mail2web.com ESMTP Exim Wed, 26 Oct 2011 19:54:09 -0400
2011-10-26 19:54:10,418 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: connected to host "smtp.gmail.com", port: 25
2011-10-26 19:54:10,418 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) EHLO <my-vps-host-name>
2011-10-26 19:54:10,456 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) 250-xsmtp05.mail2web.com Hello <my-vps-host-name> [<my-vps-ip>]
250-SIZE 104857600
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
2011-10-26 19:54:10,456 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: Found extension "SIZE", arg "104857600"
2011-10-26 19:54:10,456 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: Found extension "PIPELINING", arg ""
2011-10-26 19:54:10,456 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN"
2011-10-26 19:54:10,456 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: Found extension "STARTTLS", arg ""
2011-10-26 19:54:10,456 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) DEBUG SMTP: Found extension "HELP", arg ""
2011-10-26 19:54:10,456 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) STARTTLS
2011-10-26 19:54:10,582 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) 220 TLS go ahead
2011-10-26 19:54:10,582 INFO  [STDOUT] (http-<my-vps-ip-and-jboss-port>-15) EHLO <my-vps-host-name>
2011-10-26 19:54:10,623 ERROR [<Class that sends mail>] (http-<my-vps-ip-and-jboss-port>-15) Can't send command to SMTP host
javax.mail.MessagingException: Can't send command to SMTP host;
  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

    ...

    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

    ...

    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    ...

    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

What should I do to get rid of this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:59:00+00:00Added an answer on May 26, 2026 at 7:59 pm

    Problem was solved, it was neither a network problem or code problem. We were using javamail-1.4 and after upgrading to version 1.4.4, the issue was gone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have following problem: I have a class Foo which encapsulates a web-api. the
I have written an application using Seam 2.2.1 & MySQL which is working. I
I am learning facelets and Seam and I'm facing the following problem: I have
I have following problem: I have built a tabbar application with 4 tabs. I
I have the following problem using subversion: I'm currently working on the trunk of
I have the following problem using template instantiation [*]. file foo.h class Foo {
I have the following problem in my Data Structures and Problem Solving using Java
I have the following problem. If I query values with a keyfigure which is
We have following problem. Developers frequently need to make small changes to our web
I have following problem: My webservice application returns xml data in following order: <my_claims>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.