Htmlemail uses QQ corporate email to send problem summary
After the local mail sending test is passed according to the parameter information on htmlemail, deploy the service on the ECs to test the mail sending. The first error is reported:
Sending the email to the following server failed : smtp.exmail.qq.com:25
Ping smtp.com directly on the ECS exmail. qq. COM domain name found that the external network on the server is not connected. After opening the external network permission, the above error still exists.
browse the document and try to switch smtpport to port 465:
HtmlEmail.setSmtpPort(465);
Error still reported:
Sending the email to the following server failed : smtp.exmail.qq.com:465
Could not connect SMTP host:smtp.exmail.qq.com, port 465, response: -1
It is found that sslonconnect needs to be set to true when switching to port 465
HtmlEmail.setSSLOnConnect(true);
After modification, the error information is changed to:
Invalid address
Finally, switch smtpport to 587:
HtmlEmail.setSmtpPort(587);
Finally, no error is reported. Record it for review later.
Read More:
- [Solved] Springboot Project Error: Mail server connection failed;
- E/Art: failed sending reply to debugger: the solution of broken pipe
- The java springboot websocket service server actively closes the connection and causes java.io.EOFException to be thrown
- How to Solve java server error (java application Run Normally)
- Gitee Idea Push Error: Invocation failed Server returned invalid Response. java.lang.RuntimeException
- [Solved] Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- [Solved] Web server failed to start. Port 8080 was already in use.
- Failed to restart redis-server.service Unit not found [How to Solve]
- [Solved] Java: compilation failed: internal java compiler error
- [Solved] Failed to load resource: the server responded with a status of 404 ()
- [Solved] JAVA fx Error: java.lang.instrument ASSERTION FAILED ***: “!errorOutstanding“ with message transform
- BeanDefinitionStoreException: Failed to read candidate component class probably due to a new Java
- [Solved] hadoop Error: 9000 failed on connection exception java.net.ConnectException Denied to Access
- [Solved] mybatis Error querying database. Cause: java.sql.SQLException: The server time zone value
- [Solved] IDEA java compile error: Error:java: Compilation failed: internal java compiler error
- [Solved] java: Compilation failed: internal java compiler error
- [Solved] IDEA Compile Error: Error:java: Compilation failed: internal java compiler error
- [Solved] Tomcat Server Error: java.lang.NullPointerException Csonsole Error ClassNotFoundException: com.mysql.jdbc.Driver
- [Solved] Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerExcepti
- JUnit test classes error: java.lang.IllegalStateException: Failed to load ApplicationContext