Skip to content

Instantly share code, notes, and snippets.

@taf2
Created September 26, 2013 14:07
Show Gist options
  • Select an option

  • Save taf2/6714726 to your computer and use it in GitHub Desktop.

Select an option

Save taf2/6714726 to your computer and use it in GitHub Desktop.
function sendmail() {
subject=$1
message=$2
/usr/bin/curl -XPOST
--data-urlencode "api_user=$API_USER" \
--data-urlencode "api_key=$API_KEY"\
--data-urlencode "to=$EMAIL" \
--data-urlencode "subject=$subject" \
--data-urlencode "text=$message" \
--data-urlencode "from=$FROM_EMAIL" \
https://sendgrid.com/api/mail.send.json
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment