From owner-freebsd-questions@FreeBSD.ORG Sat Jul 14 20:03:57 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 847E116A40E for ; Sat, 14 Jul 2007 20:03:57 +0000 (UTC) (envelope-from mi+kde@aldan.algebra.com) Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by mx1.freebsd.org (Postfix) with ESMTP id 39BA013C4B2 for ; Sat, 14 Jul 2007 20:03:56 +0000 (UTC) (envelope-from mi+kde@aldan.algebra.com) Received: from aldan.algebra.com (localhost [127.0.0.1]) by aldan.algebra.com (8.14.1/8.14.1) with ESMTP id l6EK3uQN001785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 14 Jul 2007 16:03:56 -0400 (EDT) (envelope-from mi+kde@aldan.algebra.com) Received: from localhost (localhost [[UNIX: localhost]]) by aldan.algebra.com (8.14.1/8.14.1/Submit) id l6EK3umm001784 for questions@freebsd.org; Sat, 14 Jul 2007 16:03:56 -0400 (EDT) (envelope-from mi+kde@aldan.algebra.com) From: Mikhail Teterin To: questions@freebsd.org Date: Sat, 14 Jul 2007 16:03:55 -0400 User-Agent: KMail/1.9.6 X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7whJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" Cc: Subject: Can cron e-mail HTML? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2007 20:03:57 -0000 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