Some brief notes I made on sending HTML mail (with an optional attachment) from the command line.
|
1 2 3 4 5 6 7 8 9 10 11 |
$ cat ./mailheader To: you@there.com From: me@here.com MIME-Version: 1.0 Content-Type: text/html; charset=us-ascii Subject: Hello $ cat ./mailbody <center><h1>Hello</h1></center> $ cat ./mailheader ./mailbody | /usr/lib/sendmail -t # send an attachment too? $ ( cat ./mailheader ./mailbody && uuencode attachment.txt attachment.txt ) | /usr/lib/sendmail -t |