Skip to content

Instantly share code, notes, and snippets.

@KristerV
Last active August 29, 2015 14:02
Show Gist options
  • Save KristerV/2748918350373fefa09e to your computer and use it in GitHub Desktop.
Save KristerV/2748918350373fefa09e to your computer and use it in GitHub Desktop.
Meteor.http.post('https://api.mailgun.net/v2/movieatmyplace.com/messages',
{
auth:"api:" + process.env.MAILGUN_API_KEY,
params:
{
"from":"Dev McCool <[email protected]>",
"to":[e.currentTarget.value],
"subject":"Behold: the power of Meteor and Mailgun",
"html":"A <b>bold</b> greeting goes here",
"h:X-Mailgun-Variables":JSON.stringify({tracking_id:my_tracking_var}),
"o:tracking":'True'
}
},
function(error, result) {
//handle error, result (should be 200 OK)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment