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?
- tried to pass the mail service I schedule parameter is not taking, so I don't know where I need to get the mail services
export default ({ schedule }) => {
schedule('*/15 * * * *', async () => {
await mailService.send({
from: payload.email,,
to: payload.email,
cc:payload.email, ,
subject: subject,
template: {
name: ,
data: payload,
},
});
});
};