Last active
March 18, 2022 20:59
-
-
Save sendpulse/01a58073f94b34a87eef to your computer and use it in GitHub Desktop.
SendPulse REST API Usage Example for Node.js (https://sendpulse.com/api)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SendPulse's Node.JS Library: https://github.com/sendpulse/sendpulse-rest-api-node.js | |
var sendpulse = require("./api/sendpulse.js"); | |
sendpulse.init(API_USER_ID,API_SECRET,TOKEN_STORAGE); | |
var email = { | |
"html" : "<p>Your email content goes here</p>", | |
"text" : "Your email text version goes here", | |
"subject" : "Testing SendPulse API", | |
"from" : { | |
"name" : "Your Sender Name", | |
"email" : "[email protected]" | |
}, | |
"to" : [ { | |
"name" : "Subscriber's name", | |
"email" : "[email protected]" | |
} ] | |
}; | |
var answerGetter = function answerGetter(data){ | |
console.log(data); | |
} | |
sendpulse.smtpSendMail(answerGetter,email); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment