Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Sending mail from my droplet via javax.mail
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:
- mvn package -Dquarkus.native.container-build=true -DskipTests
- docker build -f src/main/docker/Dockerfile.jvm -t pservice .
- docker run –name pservice -i –rm -p 8080:8080 -d pservice
- docker logs pservice -f
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.×