Skip to content

Instantly share code, notes, and snippets.

@emadshanab
Forked from james2doyle/httpie.mailgun.sh
Created December 26, 2023 15:56
Show Gist options
  • Save emadshanab/5399a249b4429d75dc3c4db767b3dffc to your computer and use it in GitHub Desktop.
Save emadshanab/5399a249b4429d75dc3c4db767b3dffc 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