Scenario:
You want to use Office 365 SMTP server for your scheduler to send emails. Getting the following message all the time:
530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [DM5PR1101CA0003.namprd11.prod.outlook.com]
How to do that?
Solution:
Configure the js.quartz.properties with the respective values to connect to your Office 365 SMTP. For example:
report.scheduler.mail.sender.host=smtp.office365.com
report.scheduler.mail.sender.username=<address>@someaddress.com
report.scheduler.mail.sender.password=<password>
report.scheduler.mail.sender.from=<address>@someaddress.com
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=587
report.scheduler.mail.smtp.starttls.enable=true
report.scheduler.mail.smtp.auth=true
The following properties need to be appended to javaMail bean of applicationContext.xml and applicationContext-report-scheduling.xml:
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.sender.protocol needs to be SMTP
Recommended Comments