每当我从nodejs向后端注册一个用户并将该用户添加到mailchimp列表中,以便将欢迎邮件发送到该列表中的订阅者时,该邮件仅在25分钟后发送。我还尝试从已订阅列表中删除该特定用户,然后通过mailchimp没有发送欢迎电子邮件的nodejs重新添加该用户。我在这里是否缺少有关mailchimp提供的欢迎自动化的信息?为什么mailchimp服务器在25分钟后将邮件发送给注册用户?以及如何将电子邮件重新发送给该用户?
mailChimpSubscription = function (res, email, activationNumber) {
request({
url: `https://us7.api.mailchimp.com/3.0/lists/${listUniqueId}/members`,
// url: ` https://us7.api.mailchimp.com/3.0/automations/${listUniqueId}/emails/18c386e594/queue`,
mailChimpSubscription = function (res, email, activationNumber) {
request({
url: `https://us7.api.mailchimp.com/3.0/lists/${listUniqueId}/members`,
// url: ` https://us7.api.mailchimp.com/3.0/automations/${listUniqueId}/emails/18c386e594/queue`,
method: 'POST',
headers: {
"Authorization": `random ${mailchimpApiKey}`,
"Content-Type": 'application/json'
},
json: {
'email_address' : email,
'status' : 'subscribed',
'merge_fields': {
'ACTIVATION' : activationNumber
}
}
}, function (err, response, body) {
if (err) {
console.log(err)
return res.json(err);
} else {
console.log(response)
return res.json(response)
}
}
)
}
method: 'POST',
headers: {
"Authorization": `random ${mailchimpApiKey}`,
"Content-Type": 'application/json'
},
json: {
'email_address' : email,
'status' : 'subscribed',
'merge_fields': {
'ACTIVATION' : activationNumber
}
}
}, function (err, response, body) {
if (err) {
console.log(err)
return res.json(err);
} else {
console.log(response)
return res.json(response)
}
}
)
}