Hi! I want to send a email from a DOCKER CONTAINER which runs a Java-Rest-API running on my Droplet. I’m using javax.mail to send emails. It works on my local Windows machine. But i get this error when running it on my ubuntu droplet: [ERROR@EMAIL] - javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
Starting and creating my docker container with these commands:
do i need to do something like -p 25:25? or -p 465:465?
What could be the problem? I already asked the support to open up the SMTP Ports for me, they did it. But it still won’t work.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
According to the error you are using port 465 so as long as this port is open it should be alright.
You could test if this is the case for your server by running the following telnet
command:
telnet smtp.gmail.com 465
Also, I think that the problem is with the ciphers as you are getting an SSL error.
You could try removing TLSv1 and TLSv1.1 from the file $JAVA_HOME/conf/security
and give it another try.
Let me know how it goes. Regards, Bobby
Nevermind, I did it. Probably the problem was on quarkus’s-Side. Everyone who’s searching for a solution: https://quarkus.io/guides/mailer
^ This is absolute fire.