Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2007 18:27:30 -0400
From:      Mikhail Teterin <>
To:        Daniel Bye <>
Subject:   Re: Can cron e-mail HTML?
Message-ID:  <200707141827.31177@aldan>
In-Reply-To: <>
References:  <200707141603.55899@aldan> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On субота 14 липень 2007, Daniel Bye wrote:
= > 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...
= Alter your script to add the 'Content-Type: text/html' header.

No, I'm afraid, doing this will make the quoted text part of the _body_ of the 

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

= No, cron doesn't need any knowledge of how to render email.

I was not advocating adding such knowledge. My suggestion was to make cron add 
proper Content-Type, so that the /recepient's e-mail program/ will render the 
message correctly. My scripts generate HTML, someone else could be generating 
JPG images (from their web-camera, every morning)...

= The script itself doesn't have to send the mail - cron will handle that if
= there is any output when it exits, but you /can/ add headers to the message
= as you need.
= Just make sure any custom headers come before the empty line delimiter
= between headers and body, and most mail readers should do the right thing.

The empty line is inserted by cron before any of the job's own output...

This method will not work, unless the e-mail reader (incorrectly) acts upon 
parts of the body as if they were headers...

Thanks! Yours,


Want to link to this message? Use this URL: <>