Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2007 16:03:55 -0400
From:      Mikhail Teterin <mi+kde@aldan.algebra.com>
To:        questions@freebsd.org
Subject:   Can cron e-mail HTML?
Message-ID:  <200707141603.55899@aldan>

next in thread | raw e-mail | index | archive | help
Hello!

I have a script launched from cron every morning, that gets certain data over 
the Internet from a remote computer, compares the new data with that from the 
previous day, and outputs the difference (if any).

I'm relying on the fact, that cron e-mails me the output of each job.

However, I modified the script recently to produce the output (if any) in 
HTML, rather than in plain-text format.

The HTML arrives by e-mail just as well as plain text used to, but no e-mail 
program will render it as such, because neither the cron(8), nor the mail(1),
which cron uses to send e-mail, creates MIME messages...

How can I force the ``Content-Type: text/html'' header without hacking cron's 
sources? I'd rather avoid poluting my script with e-mail sending code...

Maybe, cron should apply file(1)-like logic to the e-mailed content?

Thanks for any hints. Yours,

	-mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707141603.55899>