Skip to content

Instantly share code, notes, and snippets.

@KristerV
Created April 7, 2018 17:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
# 1. Take file from Desktop with email contents
# 2. curl the mailgun API
cat ~/Desktop/email | \
curl -s --user 'api:key-YOURKEYHERE' \
https://api.mailgun.net/v3/YOUR-MAILGUN-DOMAIN/messages \
-F from='Your Name <your.email@gmail.com>' \
-F to='mailgun-list@domain.com' \
-F subject='Gotto change me every time' \
-F text="<-" "$@" # the email file gets put into this field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment