Last active
August 12, 2023 19:31
-
-
Save Rhernandez513/bda3837256f6e7f208766a1da25407dc 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