Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Autowired
- private JavaMailSenderImpl mailSender;
- for (Email_Mess mess : emails) {
- MimeMessage message = mailSender.createMimeMessage();
- ... //set values from email_mess
- mailSender.send(message);
- }
- > host = smtp.office365.com
- > port = 587
- > mail.transport.protocol = smtp
- > mail.smtp.auth = true
- > mail.smtp.starttls.enable = true
- > mail.debug = true
- > mail.smtp.connectiontimeout = 2000
Add Comment
Please, Sign In to add comment