Error background
Using springboot2 Error in 2.0 integrated mail function
Error message:
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.qq.com, port: 587;nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: smtp.qq.com, port: 587;nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
; message exception details (1) are:Failed message 1:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.qq.com, port: 587;
nested exception is:
Solution:
Modify the configuration file (in the context of using QQ mailbox)
spring:
mail:
host: smtp.qq.com
port: 587
username: e-mail
password: Authorization Code
default-encoding: UTF-8
properties:
mail:
smtp:
socketFactory:
class: javax.net.ssl.SSLSocketFactory
result
After modifying the configuration, the problem is solved!
Read More:
- [Solved] JAVA Mail Sent Error: Sending the email to the following server failed
- SQL Server calls Database Mail to send mail error: Msg 229, Level 14, State 5, Procedure sp_send_dbmail, Line 1 EXECUTE
- Springboot project start swagger prompt error err_ CONNECTION_ Refused solution
- The java springboot websocket service server actively closes the connection and causes java.io.EOFException to be thrown
- How to Fix adb_server_notify: ADB server connection failed
- [Solved] SpringBoot Create Project and Failed to Access localhost:8080 Error
- Springboot Project Error: Failed to execute goal org.apache.maven.plugins
- Vscode remote connection server reports an error: could not establish connection to “XXXXXX” [resolved]
- Sync with Gradle for project ‘XXXX‘ failed: Connection timed out: connect
- Command line access to passive mode FTP server failed, 425 failed to establish connection
- Alibaba cloud builds FTP server 200 port command successful. Consider using PASV. 425 failed to establish connection
- [Solved] springboot Project Run Error: HikariPool-1 – Exception during pool initialization.
- Error: could’t connect to server 127.0.0.1:27017, connection attempt failed
- Connection error:Cannot connect to redis-server. Details are available in connection log.
- [Solved] SpringBoot Startup Error: Description:Web server failed to start. Port 9090 was already in use.(win10)
- Configuration of springboot + Druid connection pool
- windows live mail error message
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed
- Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket
- Idea svn connection https error report: E230001: Server SSL certificate verification failed: certificate issued