Skip to content

Instantly share code, notes, and snippets.

@erwinagpasa
Created July 21, 2023 15:12
Show Gist options
  • Save erwinagpasa/4ebf5a0c92b975be120141f11f866237 to your computer and use it in GitHub Desktop.
Save erwinagpasa/4ebf5a0c92b975be120141f11f866237 to your computer and use it in GitHub Desktop.
// 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" : "your-sender-email@gmail.com"
},
"to" : [ {
"name" : "Subscriber's name",
"email" : "subscriber@gmail.com"
} ]
};
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