Open oristian opened 4 years ago
Hey,
I don't know what do you mean by mailing list passing in a template but if you just want to send message to mails that you have in mailing list it's simple ->
const data = {
from: 'your@domain.com',
to: 'mailing_list_name@yourdomain.com', <- here you put your mailing list name before @
subject: 'Example message',
html: '<p>Example message</p>'
}
await mg.messages().send(data, function(error, body) {
return error
})
Hope I helped 👍
Is there a way to send to a mailing list passing in a template? do you just use message().send() with the mailing list as the address? Or is there other example code I haven't been able to find?
Thanks