Reputation: 5309
How to send mailchimp templates with mandrill?
i have build a template in Mailchimp and send to mandrill.
when I called this API, it sent a plain email without the template. how to send with the template?
const response = await mailchimp.messages.send({
template_name:"Test",
message: {
from_email: "[email protected]",
subject: "Hello world",
text: "Welcome to Mailchimp Transactional!",
to: [{
email: "[email protected]",
type: "to"
}]
}
});
Upvotes: 0
Views: 2041
Reputation: 5309
i figure it out, you have to add a empty content field
const response = await mailchimp.messages.send({
template_name:"Test",
template_content: [],<--------ADD THIS
message: {
from_email: "[email protected]",
subject: "Hello world",
text: "Welcome to Mailchimp Transactional!",
to: [{
email: "[email protected]",
type: "to"
}]
}
});
Upvotes: 0