Ow Mun Heng writes:
On Fri, 2005-09-16 at 09:40 +0800, Ow Mun Heng wrote:On Thu, 2005-09-15 at 21:02 -0400, Sam Varshavchik wrote: > Ow Mun Heng writes:> > > 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>" > There are at least two structural problems with your message.> > 1) There is no blank line that separates mail headers from body. > > 2) The Mime-Version: header is missing.I think I've tried that as well. The Mime-Version gets appended automatically. Even doing an uuencode and sending the resultant file doesn't have it as an attachment.In any case, it's solved usingmail -a "Content-Type: text/html"Okay.. for some reason, FC3's version of mailx (8.1.33) does not have the "-a" option to mail. Any other ideas?
You can format the entire mail message yourself, and pipe it to sendmail. That's all that mailx, itself, does anyway.
Consider this as an opportunity for you to learn about proper E-mail formats.
Attachment:
pgpzMbTMN5f1d.pgp
Description: PGP signature