Last active
January 25, 2019 00:55
-
-
Save mega-arbuz/9ebc642a771635460736cfc5b7fa0683 to your computer and use it in GitHub Desktop.
Sends email with Zapier hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 4 ]; then echo "Missing parameters"; exit 1; fi | |
content=$(awk '{printf "%s\\n", $0}' $3) | |
curl --request POST \ | |
--url $4 \ | |
--header 'content-type: application/json' \ | |
--data "{ | |
\"to\": \"$1\", | |
\"subject\": \"$2\", | |
\"body\": \"$content\" | |
}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment