Gentoo Archives: gentoo-user

From: Ow Mun Heng <Ow.Mun.Heng@×××.com>
To: gentoo <gentoo-user@l.g.o>
Subject: [gentoo-user] Help with Script that sends out HTML emails
Date: Thu, 15 Sep 2005 23:12:36
Message-Id: 1126825643.6857.22.camel@neuromancer.home.net
1 Hi,
2
3 I'm writing a bash script that basically checks for stocks prices and I
4 want the formatted output to be mailed to me. I've got the script
5 working already. The only problem is the HTML is well, not displayed as
6 HTML, it's displayed RAW(and not formatted).
7
8 I'm using cron to send the email out.
9
10 I've even put the echo statement :
11
12 html_header()
13 {
14 echo "Content-Type: text/html; charset=iso-8859-1"
15 echo "<HTML><HEAD><TITLE>Stock Quotes :" $DATE "</TITLE></HEAD>"
16 echo '<STYLE TYPE="TEXT/CSS">'
17 echo "h1 {color: gray; border-bottom: 3px double silver}"
18 echo "h2,h3 {color: gray; border-bottom: 1px solid silver}"
19 echo "</STYLE></HEAD>"
20 echo "<BODY>"
21 echo "<H1>Stock Quotes :" $DATE "</H1>"
22 echo "<BR><BR>"
23 }
24
25
26 but all I get is :
27
28 Content-Type: text/html; charset=iso-8859-1
29 <HTML><HEAD><TITLE>Stock Quotes : Fri Sep 16 06:52:02 2005
30 </TITLE></HEAD>
31 <STYLE TYPE="TEXT/CSS">
32 h1 {color: gray; border-bottom: 3px double silver}
33 h2,h3 {color: gray; border-bottom: 1px solid silver}
34 </STYLE></HEAD>
35 <BODY>
36 <H1>Stock Quotes : Fri Sep 16 06:52:02 2005 </H1>
37 <BR><BR>
38
39 What sort of "content-type" do I need to put into it? or do I have to
40 format the message and use sendmail -t < quote
41
42
43 --
44 Ow Mun Heng
45 Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
46 98% Microsoft(tm) Free!!
47 Neuromancer 07:03:30 up 2 days, 19:38, 6 users, load average: 0.80,
48 0.49, 0.52
49
50
51 --
52 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Help with Script that sends out HTML emails Mike Williams <mike@××××××××.uk>
Re: [gentoo-user] Help with Script that sends out HTML emails Nick Rout <nick@×××××××.nz>
Re: [gentoo-user] Help with Script that sends out HTML emails Willie Wong <wwong@×××××××××.EDU>