Skip to content

Instantly share code, notes, and snippets.

@alexagranov
Last active August 26, 2016 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexagranov/5249943 to your computer and use it in GitHub Desktop.
Save alexagranov/5249943 to your computer and use it in GitHub Desktop.
send HTML file via `sendmail'
#!/bin/bash
MAILTO="<your.target@email>"
CONTENT="filename.html"
SUBJECT="Subject"
(
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
cat $CONTENT
) | `which sendmail` $MAILTO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment