Email Delivery Failure
See original GitHub issueI have tried all of the various SMTP options for mail delivery, however, the server fails to properly send mail regardless of the method I use. It recognizes the method it is attempting to send with, but always fails with an error stating that there is no appropriate protocol.
org.simplejavamail.mailer.internal.MailerException: Third party error
at org.simplejavamail.mailer.internal.SendMailClosure.executeClosure(SendMailClosure.java:91)
at org.simplejavamail.mailer.internal.AbstractProxyServerSyncingClosure.run(AbstractProxyServerSyncingClosure.java:56)
at org.simplejavamail.internal.util.concurrent.AsyncOperationHelper$1.run(AsyncOperationHelper.java:75)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: javax.mail.MessagingException: Could not convert socket to TLS
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1907)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:666)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at org.simplejavamail.mailer.internal.util.TransportRunner.runOnSessionTransport(TransportRunner.java:75)
at org.simplejavamail.mailer.internal.util.TransportRunner.sendMessage(TransportRunner.java:48)
at org.simplejavamail.mailer.internal.SendMailClosure.executeClosure(SendMailClosure.java:82)
... 7 common frames omitted
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at java.base/sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:170)
at java.base/sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98)
at java.base/sun.security.ssl.TransportContext.kickstart(TransportContext.java:221)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:443)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:421)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:549)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:486)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1902)
... 14 common frames omitted
05:17:06.349 [pool-24-thread-1] WARN c.s.c.c.p.provider.EmailServiceImpl - Email cannot be delivered
It, however, properly reflects the options as I change them in the config.
DEBUG o.s.m.internal.util.SessionLogger - starting async mail with session (host: smtp.<REDACTED>.com, port: 587, username: <REDACTED>, authenticate: true, transport: SMTP)
DEBUG o.s.m.internal.util.SessionLogger - starting async mail with session (host: smtp.<REDACTED>.com, port: 587, username: <REDACTED>, authenticate: true, transport: SMTPS)
DEBUG o.s.m.internal.util.SessionLogger - starting async mail with session (host: smtp.<REDACTED>.com, port: 587, username: <REDACTED>, authenticate: true, transport: SMTP_TLS)
Issue Analytics
- State:
- Created a year ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Sent email in Outlook.com comes back "delivery failed"
This message means that the recipient has too many messages in their inbox. Many email systems prevent users from receiving any new mail...
Read more >Email delivery failure: the 3 most common causes
1. Bounces. The simplest case is when you get a bounce: for instance, when the recipient's address is full (a soft bounce: just...
Read more >Mail Delivery Failed: Returning Message to Sender
Resolving Mail delivery failed: returning message to sender bounce-backs · Check the spelling of the email address for typos · Check that the...
Read more >How to Solve Email Delivery Failures and Bouncebacks
If a message fails, that connection or transfer has failed for some reason. Your mail server will know it failed, and should notify...
Read more >Why do I keep getting "Mail delivery failed: returning ...
In both cases the most common reason for getting “Mail delivery failed: returning message to sender” bounce back emails from your website, is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try the different options for
smtpStrategy
config, options are SMTP, SMTP_TLS, SMTPS. This may be misconfigured.I am adding a config property for overriding the domain name, in a few hours check for version
1.5.9
. Also you will be able to modify the local part as well (ienoreply@...
).There already is a config for overriding email sending name:
All available configs for
1.5.8
are listed here: https://github.com/clearflask/clearflask/blob/1.5.8/clearflask-server/src/main/java/com/smotana/clearflask/core/push/provider/EmailServiceImpl.javaHmm, the docker container has this under
$JAVA_HOME/conf/security/java.security
:So it seems to be fine unless I’m misreading it.
Can you modify your
docker-compose.yml
file to include the following JAVA_OPTS:Then restart and look at the extra logs. You should see logs similar to the following:
Please post the output including anything interesting around it.
The alternate option you have is to modify the docker container to comment out the
jdk.tls.disabledAlgorithms
in$JAVA_HOME/conf/security/java.security
line and try it out. If it works, just keep using that modified container.