Android Question SMTP Exchange Server Problem

mmieher

Active Member
Licensed User
Longtime User
I am trying to send SMTP email via our Exchange Server 2016. I use this code:

B4X:
      SMTP1.Initialize("*******.com", 587, "user", "pwd", "SMTP")

      SMTP1.StartTLSMode = True
   
      SMTP1.AuthMethod = SMTP1.AUTH_LOGIN

However, when I do the SMTP1.Send I get the following error:

java.security.cert.CertPAthValidatorException: Trust anchor for certification path not found.

Ideas?

Marc
 

mmieher

Active Member
Licensed User
Longtime User
Thanks, Erel. That might work on my phone, but what about the potentially hundreds of other phones that download my App from the PlayStore?
 
Upvote 0

mmieher

Active Member
Licensed User
Longtime User
I have GoDaddy certificates on the Exchange Server. It is not self-signed.

I can connect just find with an IMAP or POP3 config on my Android device, just not through my B4A App.
 
Upvote 0

mmieher

Active Member
Licensed User
Longtime User
Never mind, Erel. I now think I do have a certificate problem on Exchange Server. It is not using the GoDaddy one. Sorry for the fire drill.
 
Upvote 0

mmieher

Active Member
Licensed User
Longtime User
I got the certificate thing worked out but still get the "Trust anchor for certification path not found" error.

Here is the DigiCert report for the site:

upload_2016-6-13_10-59-28.png
 
Upvote 0

mmieher

Active Member
Licensed User
Longtime User
Thanks, Erel. Using your link I tested my certificate path setup at SSL Labs and the Exchange Server is delivering the intermediate certificate. I also verified this with GoDaddy support.

However, I have noticed that even when setting up IMAP on my Android email, I must choose "TLS Accept All Certificates". Selecting just TLS gives me a certificate error. I also noticed that all the Android documentation for setting up email specifically tells you to "Select All Certificates".

Is there a way in B4A to specify "TLS Accept All Certificates"?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I also noticed that all the Android documentation for setting up email specifically tells you to "Select All Certificates".
This can't be correct as it is a huge security hole.

Is there a way in B4A to specify "TLS Accept All Certificates"?
Currently no.
 
Upvote 0

mmieher

Active Member
Licensed User
Longtime User
I agree something is not right. Just stumped because certificate reports all say it is Ok. Even GoDaddy agreed. Site is owa.evhops.com.
 
Upvote 0
Top