diff --git a/mailgun/sendemail b/mailgun/sendemail index b979fed..cc20a76 100755 --- a/mailgun/sendemail +++ b/mailgun/sendemail @@ -8,6 +8,10 @@ if [[ -z "$MAILGUN_API_KEY" ]]; then exit 1 fi +if [[ ! -z "$MAILGUN_DOMAIN" ]]; then + MAILGUN_DOMAIN_NAME=$MAILGUN_DOMAIN +fi + if [[ -z "$MAILGUN_DOMAIN_NAME" ]]; then echo "Set the MAILGUN_DOMAIN_NAME env variable." exit 1