[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Help with Script that sends out HTML emails



Hi,

        I'm writing a bash script that basically checks for stocks
prices and I
want the formatted output to be mailed to me. I've got the script
working already. The only problem is the HTML is well, not displayed as
HTML, it's displayed RAW(and not formatted).

I'm using cron to send the email out.

I've even put the echo statement :

html_header()
{
        echo "Content-Type: text/html; charset=iso-8859-1"
        echo "<HTML><HEAD><TITLE>Stock Quotes :" $DATE "</TITLE></HEAD>"
        echo '<STYLE TYPE="TEXT/CSS">'
        echo "h1 {color: gray; border-bottom: 3px double silver}"
        echo "h2,h3 {color: gray; border-bottom: 1px solid silver}"
        echo "</STYLE></HEAD>"
        echo "<BODY>"
        echo "<H1>Stock Quotes :" $DATE "</H1>"
        echo "<BR><BR>"
}


but all I get is :

Content-Type: text/html; charset=iso-8859-1
<HTML><HEAD><TITLE>Stock Quotes : Fri Sep 16 06:52:02 2005
</TITLE></HEAD>
<STYLE TYPE="TEXT/CSS">
h1 {color: gray; border-bottom: 3px double silver}
h2,h3 {color: gray; border-bottom: 1px solid silver}
</STYLE></HEAD>
<BODY>
<H1>Stock Quotes : Fri Sep 16 06:52:02 2005 </H1>
<BR><BR>

What sort of "content-type" do I need to put into it? or do I have to
format the message and use sendmail -t < quote

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 08:52:35 up 2 days, 21:27, 5 users, load average: 1.69,
7.60, 5.86 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]