MCPcopy Index your code
hub / github.com/Packstack-Tech/packstack / addEmailSubscriber

Function addEmailSubscriber

api/utils/mailchimp.js:7–16  ·  view source on GitHub ↗
(email)

Source from the content-addressed store, hash-verified

5const mailchimp = mailchimpEnabled ? new Mailchimp(process.env.MAILCHIMP_API) : {};
6
7export const addEmailSubscriber = (email) => {
8 if (!mailchimpEnabled) {
9 return Promise.reject();
10 }
11
12 return mailchimp.post(`/lists/${audience_id}/members`, {
13 email_address: email,
14 status: 'subscribed'
15 })
16};

Callers 1

user.jsFile · 0.90

Calls 1

postMethod · 0.80

Tested by

no test coverage detected