# How to send message in html format using shell script

**URL:** <https://community.unix.com/t/how-to-send-message-in-html-format-using-shell-script/259073>\
**Category:** Shell Programming and Scripting\
**Created:** [February 6, 2010, 2:22pm UTC](https://community.unix.com/t/how-to-send-message-in-html-format-using-shell-script/259073 "2010-02-06T14:22:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baps](https://community.unix.com/letter_avatar/baps/32/6_22734026db12803ebb3e059622ac3534.png) [@baps](https://community.unix.com/u/baps)\
**Post date:** [February 6, 2010, 2:22pm UTC](https://community.unix.com/t/how-to-send-message-in-html-format-using-shell-script/259073/1 "2010-02-06T14:22:49Z")

</div>

I want to send email message in html format using unix shell script. I use sendEmail command in my script to send email message. The syntaxt of the sendEmail command is as follows:  
$sendEmail -f \<email\> -t \<email\> -u $subject -s smtpserver:port -o message-file=html

I should be able to rediret the output of script in HTML formatted file  
OR How do I create HTML file using Shell Script.

Thanks and Regards

---

<div class="post-metadata">

**Author:** ![dr.house](https://community.unix.com/letter_avatar/dr.house/32/6_22734026db12803ebb3e059622ac3534.png) [@dr.house](https://community.unix.com/u/dr.house)\
**Post date:** [February 6, 2010, 2:33pm UTC](https://community.unix.com/t/how-to-send-message-in-html-format-using-shell-script/259073/2 "2010-02-06T14:33:05Z")

</div>

You may want to copy a given html file into the message body:

```nohighlight
sendEmail [blabla] -m "$( cat html.file )" [blabla]

```
