So I'm using node.js and i installed modulem ailchimp-api (https://npmjs.org/package/mailchimp-api) so i went to offical website to read how to send mailchimp email and i figured out standard procedure.
var MailChimpAPI = require('mailchimp').MailChimpAPI;
var apiKey = 'Your MailChimpAPI API Key';
try {
var api = new MailChimpAPI(apiKey, { version : '2.0' });
} catch (error) {
console.log(error.message);
}
api.call('campaigns', 'list', { start: 0, limit: 25 }, function (error, data) {
if (error)
console.log(error.message);
else
console.log(JSON.stringify(data)); // Do something with your data!
});
api.call('campaigns', 'template-content', { cid: '/* CAMPAIGN ID */' }, function (error, data) {
if (error)
console.log(error.message);
else
console.log(JSON.stringify(data)); // Do something with your data!
});
I run on next problem ! How can I add my own text to the exsisting template in mailchimp ? I can choose campaign .. and write text ( on the web site of mailchimp ) but I wanted to send a confirmation link to the template but I dont figure out how can I do ...
maybee is some way to define the area where can i put text ? or should i copy entire html code and style from mailchimp and then put between the text the url link for confirmation ( not for subscription but for validation of user.
Thx for anwsers!