-
-
Save voice1/6e6a4d0874089f8d5bdfe7efb03ebb7b to your computer and use it in GitHub Desktop.
Simple script to send emails with mailgun api
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 | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
set -o allexport | |
source .env | |
set +o allexport | |
curl -s --user "$MAILGUN_API_KEY" \ | |
https://api.mailgun.net/v3/"$MAILGUN_DOMAIN"/messages \ | |
-F from="$SENDER" \ | |
-F to="$RECEPIENT" \ | |
-F subject="$SUBJECT" \ | |
-F text="$TEXT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment