Date: Thu, 19 Jul 2007 11:03:19 +0100 From: Tom Evans <tevans.uk@googlemail.com> To: Mikhail Teterin <mi+kde@aldan.algebra.com> Cc: questions@freebsd.org, Daniel Bye <dan@slightlystrange.org> Subject: Re: Can cron e-mail HTML? Message-ID: <1184839399.1313.16.camel@localhost> In-Reply-To: <200707141914.07646@aldan> References: <200707141603.55899@aldan> <200707141827.31177@aldan> <46995194.8000108@slightlystrange.org> <200707141914.07646@aldan>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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 your messages formatted > = exactly how you want them. > > Well, I started looking into how much effort would it be to translate the > strings returned by libmagic(3)'s routines into Content-Type. > > If it is easy enough, I could hack cron to analyze the job's output using > magic_buffer(3) and set Content-Type if anything recognizable is detected... > > The translation is the difficult part :-( Instead of the standardized > > text/html > > for example, libmagic returns: > > HTML document text > > It is trying to be human-readable, while I need the machine-readable strings. > > There is stuff on-line that does the translation, but it is in much > higher-level languages (like PHP), which think, hash-tables are free :-) > > Oh, well... > > -mi Or you could just use sendmail? 30 4 * * 1-6 ~/bin/foo 2>&1 | sendmail foo@bar.com Sendmail will read in any headers you put into the message. Eg: > $ cat sample.htmlh Subject: really? Really? will work just fine and set the email subject header when piped into sendmail. Or you could patch cron to use libmagic, and have cron scripts that will only work on one box. Hmmm, decisions, decisions... [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGnzbflcRvFfyds/cRAoiPAJ0aJTdceVKvhOuUxaZrpmSeokA77QCffT2i k1mX1dFrkHFXCL+Yd+RrnpE= =LOrJ -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1184839399.1313.16.camel>
