#!/bin/ksh #h #h reptmail - emails reports from any app that can print #h #h The idea is you capture the print to a file, using the lp spooling system #h if you cannot simply tell the app to print to a file directly. #h #h Then this script will prepend a little html and simple email headers #h and use sendmail directly to send it, so that the report comes out looking #h similar to what it looks like when actually printed, without requiring #h the recipient to correct their poorly configured email client to use a #h fixed-width font which practically all printed reports require in order #h to look right. #h #h This also makes it possible to add email ability to old or otherwise #h difficult to customize applications. #h #h Runs on at least SCO Open Server, Linux and FreeBSD, using at least #h sendmail, mmdf, and smail mail servers. This script uses the command #h "sendmail", but the other mailservers provide a dummy "sendmail" that #h satisfies the needs of this script without having to change the script. #h If you have something not listed, such as qmail, perhaps it also has a #h dummy sendmail, in which case this should "just work" with it too. #h #h usage: reptmail