Date: Mon, 17 Aug 2009 17:23:41 -0700 From: Gary Kline <kline@thought.org> To: FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG> Subject: Re: script to send out a dozen letters? Message-ID: <20090818002341.GA83528@thought.org> In-Reply-To: <20090817224403.GD51584@hal.rescomp.berkeley.edu> References: <20090815234920.GA9094@thought.org> <20090817224403.GD51584@hal.rescomp.berkeley.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 17, 2009 at 03:44:04PM -0700, Chris Cowart wrote: > Gary Kline wrote: [[ ... ]] > > Here's a script I whipped up a year or two ago that sends out e-mails. > You could definitely tweak it to find/replace a LaTeX template and send > it directly to the printer (circa the `| sendmail` line). See the > included readme (excuse the twiki formatting). While it was written for > bash, it may run under /bin/sh (but I make no claims). > > It's really straightforward. I would die a little inside if it were used > to send HTML e-mail, but there's nothing to stop you from writing HTML > (by hand) into the template (or saving a message out of your GUI MUA of > choice into a flat file and using that as your template). > > -- > Chris Cowart > Network Technical Lead > Network & Infrastructure Services, RSSP-IT > UC Berkeley [[ saving :-) ]] > > <verbatim> > EMAIL;LNAME;FNAME;FOOD > ccowart@rescomp.berkeley.edu;Cowart;Chris;Bananas > keenanp@rescomp.berkeley.edu;Keenan;Parms;Ice Cream > jeremydw@rescomp.berkeley.edu;Jeremy;Weinstein;Rabbit Food > </verbatim> > > Call this file ~/email_data. > > *Note:* The only column title with special meaning is "EMAIL" and it *must* > appear in the data file. All other columns follow brain-dead substitutions > and do not affect the behavior of the automailer. > > ---++ The Template File > Here, you compose your e-mail. Note you must conform to RFC822 (Here's a > summary of the relevant points): > * You must include the To, From, Cc, and Subject headers. > * Headers must be properly formatted (=Name: Contents Can Have Spaces=) > * The headers end with a blank line. There must be a blank line before > you begin your message. > > *Example:* > > <verbatim> > From: The Party Planning Committee <ppc@rescomp.berkeley.edu> > To: FNAME LNAME <EMAIL> > Subject: The Potluck > > Hello FNAME, > > Please remember to bring FOOD to the potluck. > > Thanks, > > The Party Planning Committee > </verbatim> > > Call this file ~/email_template. > > *Note:* > * Column titles (see The Data File section) will be substituted with the > current record's column contents. The address in the EMAIL column will > receive a copy of the message. > * Including a Cc or Bcc header in the template will *NOT* affect who > receives a copy of the message. > > *Warning:* The recipient will receive the message AS-IS. > __Bcc Headers will not be filtered__. > > ---++ Sending the Message > > After you declare the data file and template file (in that order), you may > add e-mail addresses to the command line (e.g., hiring@rescomp.berkeley.edu). > Note that other than the recipient address, no addresses (Bcc or Cc) are > parsed from your message's headers. As such, if you have cc or bcc recipients, > you must declare them here. Note also that declaring recipients here does > *not* affect the To/From/Cc/Bcc headers in the actual e-mail message. > > =automail ~/email_data ~/email_template cc_address1 bcc_address2= Thanks to my friends amd fellow nerds who have come thru with this. It turns out that there were only Seven people/firms for what I originally wanted. [ it had to do with sellinf my book ]. --well, actually there were 8 but the last one seemed like a stuffed shirt, so i passed on that guy. where these kinds of scripts will be useful is when i look for a job as an ethicist. (I know, I know; wall street doesn't know what ethics is... .) still, there are other places where the discipline is essential. later on, people, gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 5.67a release of Jottings: http://jottings.thought.org/index.php
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090818002341.GA83528>