Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mail sending not working since v8.6.0 #564

Open
kurtjmeyoung opened this issue Nov 23, 2024 · 0 comments
Open

Mail sending not working since v8.6.0 #564

kurtjmeyoung opened this issue Nov 23, 2024 · 0 comments

Comments

@kurtjmeyoung
Copy link

kurtjmeyoung commented Nov 23, 2024

Hello,

since v8.6.0 I get the following stacktrace when attempting to send out a mail (up to current v8.12.2). v8.5.1 is working without any issues for me. Maybe I need to configure something differently since v8.6.0 and I'm just overseeing the information somewhere? Would really appreciate If you could help me figure it out.

I'm using jdk 21.0.5

simplified code:

MailerBuilder mailer = MailerBuilder
                .withSMTPServer("<host.ip.address>", 25)
                .async()
                .buildMailer();

EmailPopulatingBuilder emailBuilder = EmailBuilder.startingBlank()
                .to("<recipient.mail.address>")
                .from("<from.mail.address>")
                .withSubject("<subject>")
                .withHTMLText("<html body>");

mailer.sendMail(emailBuilder.buildEmail());

Stacktrace:

[ERROR] [o.s.i.u.c.NamedRunnable] - Failed to run sendMail process
org.simplejavamail.mailer.internal.MailerException: Failed to send email [Subject: '<subject>'], reason: Third party error
	at org.simplejavamail.mailer.internal.SendMailClosure.handleException(SendMailClosure.java:85)
	at org.simplejavamail.mailer.internal.SendMailClosure.executeClosure(SendMailClosure.java:72)
	at org.simplejavamail.mailer.internal.AbstractProxyServerSyncingClosure.run(AbstractProxyServerSyncingClosure.java:56)
	at org.simplejavamail.internal.util.concurrent.NamedRunnable.run(NamedRunnable.java:40)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
Caused by: jakarta.mail.MessagingException: Could not convert socket to TLS
	at org.eclipse.angus.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2173)
	at org.eclipse.angus.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:741)
	at jakarta.mail.Service.connect(Service.java:345)
	at jakarta.mail.Service.connect(Service.java:225)
	at jakarta.mail.Service.connect(Service.java:174)
Caused by: java.io.IOException: Can't verify identity of server: <host.ip.address>
	at org.eclipse.angus.mail.util.SocketFetcher.checkServerIdentity(SocketFetcher.java:699)
	at org.eclipse.angus.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:636)
	at org.eclipse.angus.mail.util.SocketFetcher.startTLS(SocketFetcher.java:555)
	at org.eclipse.angus.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2168)
	at org.eclipse.angus.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:741)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant