Good morning/day/afternoon. I have a problem using...
# lucee
m
Good morning/day/afternoon. I have a problem using mailjet as email provider. Whenever I try sending a mail with mailjet the following erroro occurs in the mail.log:
Copy code
"ERROR","Thread-106437","04/12/2022","09:33:27","mail","Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 25;lucee.runtime.exp.NativeException: Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 25
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2211)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
	at javax.mail.Service.connect(Service.java:366)
	at lucee.runtime.net.smtp.SMTPSender.run(SMTPSender.java:60)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 25;
  nested exception is:
	javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
	... 4 more
Caused by: javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
	at java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketInputRecord.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:626)
	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:400)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:217)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2175)
	... 3 more
"
System: Ubuntu, Apache2, Lucee 5.3.9.115-RC (happened also with 5.3.8), let's encrypt certificates. Any idea what is happening here?
z
SSL SMTP is usually on a different port than 25?
m
Tried all, 587, 465, with and without TLS, etc.
Can i find somewhere a Bit more of information about the Error instead of the Not helpful "sorry, doesn't Work, but i'm Not telling you why"
z
well, shown me the stack for a proper ssl port first 🙂 i am just going off what you posted !!!!
m
Will do 😉
Really curious, in a Seconds Server everything ist fine and i can't See a difference
Ok, this is the message with the submission port:
Copy code
"ERROR","Thread-154636","04/14/2022","11:40:39","mail","Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 587;lucee.runtime.exp.NativeException: Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 587
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2211)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
	at javax.mail.Service.connect(Service.java:366)
	at lucee.runtime.net.smtp.SMTPSender.run(SMTPSender.java:60)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: <http://in-v3.mailjet.com|in-v3.mailjet.com>, port: 587;
  nested exception is:
	javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
	... 4 more
Caused by: javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
	at java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketInputRecord.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
	at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:626)
	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:400)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:217)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2175)
	... 3 more
"
What I found in the catalina.log is this:
Copy code
14-Apr-2022 11:40:39.477 WARNING [Thread-154636] javax.mail.Session.loadResource expected resource not found: /META-INF/javamail.default.address.map
z
na, that's just noise (I'm not "sorry, doesn't Work, but i'm Not telling you why" you!)
😉 1
are using using a username and password?
m
Yes, it's using the username/password way, not the API. Having the same on a 5.3.3 and 5.3.7 server works. Seeing one major difference: The working servers are using Java 1.8.0, the not working one 11.0.4 (unintentionally installed this version)