Skip to content

Instantly share code, notes, and snippets.

@thatmarvin
Created February 21, 2013 22:43
Show Gist options
  • Save thatmarvin/5009092 to your computer and use it in GitHub Desktop.
Save thatmarvin/5009092 to your computer and use it in GitHub Desktop.
Demonstrating HTTP 500 response from PostageApp
/*
Remember to fill in your API key.
usage: node postageapp.js [email protected]
*/
var apiKey = 'FILL IN YOUR API KEY HERE',
postageapp = require('postageapp')(apiKey),
recipient = process.argv[2];
var payload = {
recipients: recipient,
content: {
'text/plain': 'é'
}
};
postageapp.sendMessage(payload, function (err, res) {
if (err) {
console.error(err);
process.exit(1);
}
console.log(res);
process.exit(0);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment