java.lang.RuntimeException: javax.mail.MessagingException: [EOF](Caused by: javax.mail.MessagingException: [EOF])

后端 未结 2 374
半阙折子戏
半阙折子戏 2021-01-22 03:23

I am trying to write a simple mail sender with usig javax.mail

MailService:

@Service
public class MailServiceImpl implements Ma         


        
相关标签:
2条回答
  • 2021-01-22 03:38

    Add:

    <prop key="mail.debug">true</prop>
    <prop key="mail.smtps.localhost">'localhost'</prop>
    
    0 讨论(0)
  • 2021-01-22 03:53

    Add the following properties:

    properties.put("mail.smtp.starttls.enable", "true");
    properties.put("mail.smtp.port", "465");
    

    If it doesnt work, try chaning the port:

    properties.put("mail.smtp.starttls.enable", "true");
    properties.put("mail.smtp.port", "587");
    
    0 讨论(0)
提交回复
热议问题