Skip to content

Instantly share code, notes, and snippets.

@james2doyle
Created December 17, 2015 21:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save james2doyle/5c529450c140c41c06f4 to your computer and use it in GitHub Desktop.
Save james2doyle/5c529450c140c41c06f4 to your computer and use it in GitHub Desktop.
Test the mailgun API with HTTPIE
#!/usr/bin/env bash
DOMAIN="example.com"
EMAIL="contact@personalemail.com"
http -a 'api:key-00000000000000000000000000000000' \
-f POST "https://api.mailgun.net/v3/$DOMAIN/messages" \
from="Excited User <postmaster@$DOMAIN>" \
to="$EMAIL" \
subject="Hello" \
text="Your domain: $DOMAIN is working!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment