Last active
March 3, 2019 08:29
-
-
Save rpetrenko/4aacef11c6949504f3390f9382c68ed6 to your computer and use it in GitHub Desktop.
send email with html attachment (in linux)
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 [ "$#" -ne 3 ]; then | |
echo "Arguments: <email> <subject> <fname.html>" | |
exit 1 | |
fi | |
mail --content-type=text/html --attach="$3" --subject "$2" $1 < /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
send_email.sh test@test.com "test subject" filename.html