Date: Mon, 16 Jul 2007 15:00:34 +0200 From: Ruben de Groot <mail25@bzerk.org> To: Mikhail Teterin <mi+kde@aldan.algebra.com> Cc: questions@freebsd.org, Derek Ragona <derek@computinginnovations.com> Subject: Re: Can cron e-mail HTML? Message-ID: <20070716130034.GA81331@ei.bzerk.org> In-Reply-To: <200707141821.17085@aldan> References: <200707141603.55899@aldan> <6.0.0.22.2.20070714155424.0242a958@mail.computinginnovations.com> <200707141821.17085@aldan>
next in thread | previous in thread | raw e-mail | index | archive | help
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 -- your script should simply produce output to stdout. Cron will mail > all that to the address specified in MAILTO=... part of your crontab > automatically. > > AFAIK, to make the e-mail message treated as a MIME one, the "MIME-Version: > 1.0" and "Content-Type: ..." have to be among _headers_. > > I'm afraid, it is not possible to directly manipulate the message's headers > using mail(1), which is why I asked my question in the first place... Just for the record, cron seems to be using /usr/lib/sendmail, not mail(1): malenfant# grep -r _PATH_SENDMAIL /usr/src/usr.sbin/cron/cron/config.h #if !defined(_PATH_SENDMAIL) # define _PATH_SENDMAIL "/usr/lib/sendmail" #define MAILCMD _PATH_SENDMAIL /*-*/ malenfant# grep _PATH_SENDMAIL /usr/include/paths.h #define _PATH_SENDMAIL "/usr/sbin/sendmail" cheers, Ruben
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070716130034.GA81331>