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

后端 未结 2 407
被撕碎了的回忆
被撕碎了的回忆 2021-01-22 03:08

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:36

    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");
    

提交回复
热议问题