Code: Select all
Store store = session.getStore("imaps");
store.connect(server, username, password);
< /code>
Der Code funktioniert gut und E -Mail wird angeschlossen, während das Projekt inlocal < /p>
ausgeführt wird, aber wenn wir das Projekt in Docker -Container ausführen. Der folgende Fehler wird geworfen. < /P>
javax.mail.MessagingException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate);
nested exception is:
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:665)
< /code>
Docker -Datei < /p>
FROM markhobson/maven-chrome:latest
WORKDIR /app
ARG ENVUrl=''
ENV ENVUrl $ENVUrl
ENV JAVA_OPTS="-Djava.awt.headless=true -Dmail.smtp.starttls.enable=true -Dmail.smtp.ssl.protocols=TLSv1.2"
COPY ./Framework .
Mobile version