用spring邮件发送有时候好用,有时候出现下面错误。为什么?
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.126.com", port 25, isSSL false
DEBUG SMTP: exception reading response:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
org.springframework.mail.MailSendException: Mail server connection failed;
nested exception is javax.mail.MessagingException: Exception reading response;
------解决方案--------------------
友情帮顶!!