Saturday, January 15, 2011

Sending HTML content using sendmail in Linux

 export CONTENT="servicelist_201.html"
export SUBJECT="RAC checks"
(
 echo "From: Your email-ID "
 echo "To: Reciepent email-ID "
 echo "MIME-Version: 1.0"
 echo "Content-Type: multipart/alternative; "
 echo ' boundary="Foot note"'
 echo "Subject: $SUBJECT"
 echo "MIME-Version: 1.0"
 echo "Content-Type: text/html"
 echo "Content-Disposition: inline"
 cat $CONTENT
) | /usr/sbin/sendmail -t

No comments:

Post a Comment