Skip to content

Instantly share code, notes, and snippets.

@qinshulei
Created March 16, 2015 08:23
Show Gist options
  • Select an option

  • Save qinshulei/57c3aaefae0c91ddc695 to your computer and use it in GitHub Desktop.

Select an option

Save qinshulei/57c3aaefae0c91ddc695 to your computer and use it in GitHub Desktop.
send html email use template by bash
#!/bin/bash
TITLE="Mail Title"
CONTENT="Mail Content"
cat <<EOF | mutt -s "${TITLE}" -e 'set content_type="text/html"' -- 527072230@qq.com
<html>
<body>
<h1>${TITLE}</h1>
<p>${CONTENT}</p>
</body>
</html>
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment