on 2018 Jul 26 9:45 PM
Hi Experts ,
As We know We triggered one single email id with cronjob .
So my question is , How to configure multiple email id instead of single email id with Cron Job .
If anyone have any idea , please reply so that i can implement this functionality . .
Any reply is greatly appreciated.
Regards,
Satish
Request clarification before answering.
Hi Satish,
You should use the EmailService in the CronJob JobPerformance coding.
When you have the values you want to return, then send the emails and finally make the PerformResult return.
You can store the email addresses you want to send them to via the Database in a model for this job to receive via FlexibleSearch.
// Send Emails
List<EmailAddressModel> toAddresses = // Get addresses from hardcoding, or database model.
emailService.send(emailService.createEmailMessage(toAddresses, ...));
// Return Result.
return new PerformResult(CronJobResult.SUCCESS, CronJobStatus.FINISHED);
You will need to add in error checking, but that is a basic code sample.
Regards,
Luke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.