Send HTML Formatted Mail from Unix Using Sendmail

Posted November 11, 2004 by braindonor in UNIX

I have used this quite often, and it works great for me. We are on an HP box running Unix 11.11. You can embed javascripts, css, etc.

echo "From:"
echo "To:"
echo "MIME-Version: 1.0"
echo "Content-Type: multipart/mixed;"
echo ' boundary="PAA08673.1018277622/"'
echo "Subject: Test Message"
echo ""
echo "This is a MIME-encapsulated message"
echo ""
echo "--PAA08673.1018277622/"
echo "Content-Type: text/html"
echo ""
echo "

Test Message Body

echo "--PAA08673.1018277622/"
) | sendmail -t

The Conversation

Follow the reactions below and share your own thoughts.

  • cool

    HTML emails are cool!

  • Anonymous

    The last boundary should have a — at the end, i.e.:

  • Shantanu Borate

    I am getting “No recipient addresses found in header” even though I have mentioned email id. Please let me know how do I fix it.


  • abc

    can we use button in html email and can we use javascript for action of that button