Re: Can cron e-mail HTML?

2007-07-19 Thread Mikhail Teterin
On четвер 19 липень 2007, Tom Evans wrote: = Teaching cron about file types/mime types is an awful idea Why? My particular cron-job generates HTML. Somebody else's might generate a JPG image -- from their telescope every morning. There is no reason for these jobs to have to do the e-mailing on t

Re: Can cron e-mail HTML?

2007-07-19 Thread Tom Evans
On Thu, 2007-07-19 at 07:55 -0400, Mikhail Teterin wrote: > On четвер 19 липень 2007, Tom Evans wrote: > = Or you could patch cron to use libmagic > > Done: > > http://aldan.algebra.com/~mi/cron-mime.diff > > It even works now... > > = and have cron scripts that will only work on one box.

Re: Can cron e-mail HTML?

2007-07-19 Thread Mikhail Teterin
On четвер 19 липень 2007, Tom Evans wrote: = Or you could patch cron to use libmagic Done: http://aldan.algebra.com/~mi/cron-mime.diff It even works now... = and have cron scripts that will only work on one box. And send-pr the diffs to FreeBSD :-) -mi __

Re: Can cron e-mail HTML?

2007-07-19 Thread Tom Evans
On Sat, 2007-07-14 at 19:14 -0400, Mikhail Teterin wrote: > On субота 14 липень 2007, Daniel Bye wrote: > = So it's beginning to look as if your best bet is in fact to make your > = script handle sending the mail. > > Yeah, seems like it... > > = Not the cleanest solution, but one that will get y

Re: Can cron e-mail HTML?

2007-07-16 Thread Ruben de Groot
On Sat, Jul 14, 2007 at 06:21:16PM -0400, Mikhail Teterin typed: > = To accomplish this I have my cron job run a script like this > > Sorry, I missed the most important part. Your script just uses /usr/bin/mail, > the same way cron does. You are not adding anything, not already present in > cron

Re: Can cron e-mail HTML?

2007-07-15 Thread Derek Ragona
At 05:02 PM 7/14/2007, Mikhail Teterin wrote: Derek Ragona wrote: = = I'd rather avoid poluting my script with e-mail sending code... = You need to change your script to send the email itself. Thank you, Derek, but -- as I stated already -- I wanted to see, if this can be avoided... Doing so

Re: Can cron e-mail HTML?

2007-07-15 Thread Mikhail Teterin
On неділя 15 липень 2007, Daniel Bye wrote: = Is /usr/share/misc/magic.mime of any use? Apparently it is consulted by = file(1) when called with -i. According to libmagic(3), magic_open() with = the MAGIC_MIME flag should do the same. Yes, indeed -- just the ticket... Thanks. Now, I have not rece

Re: Can cron e-mail HTML?

2007-07-15 Thread Daniel Bye
Mikhail Teterin wrote: > On субота 14 липень 2007, Daniel Bye wrote: > = So it's beginning to look as if your best bet is in fact to make your > = script handle sending the mail. > > Yeah, seems like it... > > = Not the cleanest solution, but one that will get your messages formatted > = exactly

Re: Can cron e-mail HTML?

2007-07-15 Thread Derek Ragona
At 03:03 PM 7/14/2007, Mikhail Teterin wrote: 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

Re: Can cron e-mail HTML?

2007-07-14 Thread Mikhail Teterin
On субота 14 липень 2007, Daniel Bye wrote: = So it's beginning to look as if your best bet is in fact to make your = script handle sending the mail. Yeah, seems like it... = Not the cleanest solution, but one that will get your messages formatted = exactly how you want them. Well, I started loo

Re: Can cron e-mail HTML?

2007-07-14 Thread Daniel Bye
Mikhail Teterin wrote: > = 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 > message. Ack. Yes, you're quite right. Sorry for the bum advice. > = > Maybe, cron should apply file(1)-like logic to

Re: Can cron e-mail HTML?

2007-07-14 Thread Daniel Bye
Mikhail Teterin wrote: > 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 m

Re: Can cron e-mail HTML?

2007-07-14 Thread Mikhail Teterin
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 t

Re: Can cron e-mail HTML?

2007-07-14 Thread Mikhail Teterin
= To accomplish this I have my cron job run a script like this Sorry, I missed the most important part. Your script just uses /usr/bin/mail, the same way cron does. You are not adding anything, not already present in cron -- your script should simply produce output to stdout. Cron will mail all

Re: Can cron e-mail HTML?

2007-07-14 Thread Mikhail Teterin
Derek Ragona wrote: = = I'd rather avoid poluting my script with e-mail sending code... = You need to change your script to send the email itself. Thank you, Derek, but -- as I stated already -- I wanted to see, if this can be avoided... Since you posted your script, I'll comment on it. First