Created
March 29, 2013 23:24
Revisions
-
typerandom created this gist
Mar 29, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ var alphamail = require('alphamail'); var emailService = new alphamail.EmailService("API-TOKEN"); var data = {name:"Joe", pwns:true, likesCats:"certainly"}; var payload = new alphamail.EmailMessagePayload() .setProjectId(1235) // ID of your AlphaMail project .setSender(new alphamail.EmailContact("My Company", "your@domain.com")) .setReceiver(new alphamail.EmailContact("Some dude", "receiver@some55-domain.com")) .setBodyObject(data); emailService.queue(payload, function(error, result){ if(error){ console.log(error); return; } console.log("Email sent! ID = " + result); });