Reputation: 69
In Hooks we have the option to run scheduled cron jobs, so I want to use mail services here, how to get the mailService here?
export default ({ schedule }) => {
schedule('*/15 * * * *', async () => {
await mailService.send({
from: payload.email,,
to: payload.email,
cc:payload.email, ,
subject: subject,
template: {
name: ,
data: payload,
},
});
});
};
Upvotes: 1
Views: 212