I am trying to write a simple mail sender with usig javax.mail
MailService:
@Service
public class MailServiceImpl implements Ma
Add:
<prop key="mail.debug">true</prop>
<prop key="mail.smtps.localhost">'localhost'</prop>
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");