Re: script to send out a dozen letters?

2009-08-17 Thread Chris Cowart
Gary Kline wrote:
 if there are tools to do this, please point me at them, but i
 want to send out a snail and/or email|HTML|whatever to a handful
 of companies that i hope to find online.
 
 I'm guessing the inside address would me something like
 
 Company Name
 Address
 Company Email
 
 Attn Mr. Smith:
 
 [my canned letter]
 
 
 i forget if the inside address is before the recipient
 address--I *think* so.   is there a way of having date output
 the format 15 August, 2009 rather than my usual, 15aug09?
 
 I am pretty sure these people are most accustomed to GUI/html 
 mail, so is there a way of invoking evo with html capability?
 
 if there are web pointers on this, puleeze clue me in!

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
#! /bin/bash

if [ -z $1 ] || [ -z $2 ] || [ x$1 == x--help ]; then
printf Usage:\n\t${0} data_file template_file [cc1 [cc2 ... ]]\n
exit 1
fi

data=$1
shift
template=$1
shift

exec 0${data}

read line

FIELDS=$(echo $line | tr ';' ' ')

while read line ; do
column=1
SCRIPT=
email=
for field_title in $FIELDS ; do
datum=$(echo $line | cut '-d;' -f${column})
SCRIPT=${SCRIPT:+${SCRIPT};}s:$field_title:$datum:
column=$(($column + 1))
if [ $field_title = EMAIL ] ; then
email=$datum
fi
done

printf Mailing %s...  $email
sed $SCRIPT $template | sendmail $email $@ || { 
echo Something error happened ; continue; }
printf Success!\n

done
---+ Overview
The =automail= script allows you to send templated e-mails to a list of
recipients. This is particularly useful during hiring.

---+ Usage
The =automail= script is installed on hal. 

---++ The Data File
You must prepare a file with the data that will be used to fill in the
templates.

The first line of this file includes the case-sensitive field names, 
separated by semi-colons. Each subsequent line is a data record. One e-mail
will be sent for each data record in the file.

*Example:*

verbatim
EMAIL;LNAME;FNAME;FOOD
ccow...@rescomp.berkeley.edu;Cowart;Chris;Bananas
keen...@rescomp.berkeley.edu;Keenan;Parms;Ice Cream
jerem...@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 p...@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., hir...@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=


pgpDcx8BT5o1z.pgp
Description: PGP signature


Re: script to send out a dozen letters?

2009-08-17 Thread Gary Kline
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
 ccow...@rescomp.berkeley.edu;Cowart;Chris;Bananas
 keen...@rescomp.berkeley.edu;Keenan;Parms;Ice Cream
 jerem...@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 p...@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., hir...@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  kl...@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

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: script to send out a dozen letters?

2009-08-16 Thread Tim Kellers

Gary Kline wrote:

On Sat, Aug 15, 2009 at 10:07:15PM -0500, Adam Vande More wrote:
  

On Sat, Aug 15, 2009 at 6:49 PM, Gary Kline kl...@thought.org wrote:



   if there are tools to do this, please point me at them, but i
   want to send out a snail and/or email|HTML|whatever to a handful
   of companies that i hope to find online.

   I'm guessing the inside address would me something like

   Company Name
   Address
   Company Email

   Attn Mr. Smith:

   [my canned letter]


   i forget if the inside address is before the recipient
   address--I *think* so.   is there a way of having date output
   the format 15 August, 2009 rather than my usual, 15aug09?

   I am pretty sure these people are most accustomed to GUI/html
   mail, so is there a way of invoking evo with html capability?

   if there are web pointers on this, puleeze clue me in!

   thanks much,

   gary

--
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service
Unix
   http://jottings.thought.org   http://transfinite.thought.org

Not entirely clear on you goal here, but if this is a repetitive thing any
  

of the major scripting lang Perl,PHP,Python etc is easily up to the task.
Otherwise OpenOffice merge works great too once you get the hang of it.




i'm thinking of a /bin/sh script.  if $1@ caputures a whole line,
	that would grab, say 


123 Main Street

and $2@ would grab

York, PA 12345-6789



Actually, I'm trying to figure out something I can reuse if and
when necessary, including applying for a JOB!!  whatever

tx,

gary




  

--
Adam Vande More



  
t may be a bit of overkill, but you might want to take a look at a 
customer relationship manager (CRM).  Both vtiger and sugarcrm are in 
ports (the lastest version of vtiger 5.1 is not yet in the ports, but it 
is a snap ti install, anyway).  You have the ability to maintain 
Contacts and Leads, create merged e-mail templates and other custom 
templates in vtiger, and it is so flexible you can hack up the code to 
make it do just about anything you can think of without going nuts 
trying to figure out how the program does what it does.  You need 
Apache, php5 with some simple extensions, and MySQL (PostgresQL is 
coming soon). vtiger 5.1 also has an html e-mal editor built in and 
produces very servicable output.


Leads would be your job prospects, Contacts would be your Leads that 
actually produced a dialogue.  I've adapted it to handle Student 
marketing enquiries and do customized bulk e-mailings where I work and 
it is very easy to set-up and use.


Tim Kellers
CPE/NJIT
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: script to send out a dozen letters?

2009-08-16 Thread Gary Kline
On Sun, Aug 16, 2009 at 02:43:03AM -0400, Tim Kellers wrote:
 Gary Kline wrote:
 On Sat, Aug 15, 2009 at 10:07:15PM -0500, Adam Vande More wrote:
   
 On Sat, Aug 15, 2009 at 6:49 PM, Gary Kline kl...@thought.org wrote:
 
 
if there are tools to do this, please point me at them, but i
want to send out a snail and/or email|HTML|whatever to a handful
of companies that i hope to find online.
 
I'm guessing the inside address would me something like
 
Company Name
Address
Company Email
 
Attn Mr. Smith:
 
[my canned letter]
 
 
i forget if the inside address is before the recipient
address--I *think* so.   is there a way of having date output
the format 15 August, 2009 rather than my usual, 15aug09?
 
I am pretty sure these people are most accustomed to GUI/html
mail, so is there a way of invoking evo with html capability?
 
if there are web pointers on this, puleeze clue me in!
 
thanks much,
 
gary
 
 --
  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service
 Unix
http://jottings.thought.org   http://transfinite.thought.org
 
 Not entirely clear on you goal here, but if this is a repetitive thing 
 any
   
 of the major scripting lang Perl,PHP,Python etc is easily up to the task.
 Otherwise OpenOffice merge works great too once you get the hang of it.
 
 
 
  i'm thinking of a /bin/sh script.  if $1@ caputures a whole line,
  that would grab, say 
 
  123 Main Street
 
  and $2@ would grab
 
  York, PA 12345-6789
 
 
 
  Actually, I'm trying to figure out something I can reuse if and
  when necessary, including applying for a JOB!!  whatever
 
  tx,
 
  gary
 
 
 
 
   
 -- 
 Adam Vande More
 
 
   
 t may be a bit of overkill, but you might want to take a look at a 
 customer relationship manager (CRM).  Both vtiger and sugarcrm are in 
 ports (the lastest version of vtiger 5.1 is not yet in the ports, but it 
 is a snap ti install, anyway).  You have the ability to maintain 
 Contacts and Leads, create merged e-mail templates and other custom 
 templates in vtiger, and it is so flexible you can hack up the code to 
 make it do just about anything you can think of without going nuts 
 trying to figure out how the program does what it does.  You need 
 Apache, php5 with some simple extensions, and MySQL (PostgresQL is 
 coming soon). vtiger 5.1 also has an html e-mal editor built in and 
 produces very servicable output.
 
 Leads would be your job prospects, Contacts would be your Leads that 
 actually produced a dialogue.  I've adapted it to handle Student 
 marketing enquiries and do customized bulk e-mailings where I work and 
 it is very easy to set-up and use.
 
 Tim Kellers
 CPE/NJIT


This really looks interesting for when I've finished my book and have
customers and feedback; need to track my ideas to promote novel, deal 
with
returns and resales.  And yes, then finding a job and my third career! 

vtiger looks interesting and if the docs are readable, then all the more
so.  i'm familiar with everything but mysql.  I know it, but am far from
expert.  ...Hm.  

thanks much for the insight!

gary



-- 
 Gary Kline  kl...@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

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: script to send out a dozen letters?

2009-08-15 Thread Michelle Konzack
Am 2009-08-15 16:49:24, schrieb Gary Kline:
   i forget if the inside address is before the recipient
   address--I *think* so.   is there a way of having date output
   the format 15 August, 2009 rather than my usual, 15aug09?

date +%d %B %Y

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
http://www.tamay-dogan.net/ Michelle Konzack
http://www.can4linux.org/   Apt. 917
http://www.flexray4linux.org/   50, rue de Soultz
Jabber linux4miche...@jabber.ccc.de   67100 Strabourg/France
IRC#Debian (irc.icq.com)  Tel. DE: +49 177 9351947
ICQ#328449886 Tel. FR: +33  6  61925193
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: script to send out a dozen letters?

2009-08-15 Thread Adam Vande More
On Sat, Aug 15, 2009 at 6:49 PM, Gary Kline kl...@thought.org wrote:


if there are tools to do this, please point me at them, but i
want to send out a snail and/or email|HTML|whatever to a handful
of companies that i hope to find online.

I'm guessing the inside address would me something like

Company Name
Address
Company Email

Attn Mr. Smith:

[my canned letter]


i forget if the inside address is before the recipient
address--I *think* so.   is there a way of having date output
the format 15 August, 2009 rather than my usual, 15aug09?

I am pretty sure these people are most accustomed to GUI/html
mail, so is there a way of invoking evo with html capability?

if there are web pointers on this, puleeze clue me in!

thanks much,

gary

 --
  Gary Kline  kl...@thought.org  http://www.thought.org  Public Service
 Unix
http://jottings.thought.org   http://transfinite.thought.org

 Not entirely clear on you goal here, but if this is a repetitive thing any
of the major scripting lang Perl,PHP,Python etc is easily up to the task.
Otherwise OpenOffice merge works great too once you get the hang of it.


-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: script to send out a dozen letters?

2009-08-15 Thread Gary Kline
On Sun, 2009-08-16 at 02:39 +0200, Michelle Konzack wrote:
 Am 2009-08-15 16:49:24, schrieb Gary Kline:
  i forget if the inside address is before the recipient
  address--I *think* so.   is there a way of having date output
  the format 15 August, 2009 rather than my usual, 15aug09?
 
 date +%d %B %Y

Yup!   super, dank,

gary
  
 
 Thanks, Greetings and nice Day/Evening
 Michelle Konzack
 Systemadministrator
 Tamay Dogan Network
 Debian GNU/Linux Consultant
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: script to send out a dozen letters?

2009-08-15 Thread Gary Kline
On Sat, Aug 15, 2009 at 10:07:15PM -0500, Adam Vande More wrote:
 On Sat, Aug 15, 2009 at 6:49 PM, Gary Kline kl...@thought.org wrote:
 
 
 if there are tools to do this, please point me at them, but i
 want to send out a snail and/or email|HTML|whatever to a handful
 of companies that i hope to find online.
 
 I'm guessing the inside address would me something like
 
 Company Name
 Address
 Company Email
 
 Attn Mr. Smith:
 
 [my canned letter]
 
 
 i forget if the inside address is before the recipient
 address--I *think* so.   is there a way of having date output
 the format 15 August, 2009 rather than my usual, 15aug09?
 
 I am pretty sure these people are most accustomed to GUI/html
 mail, so is there a way of invoking evo with html capability?
 
 if there are web pointers on this, puleeze clue me in!
 
 thanks much,
 
 gary
 
  --
   Gary Kline  kl...@thought.org  http://www.thought.org  Public Service
  Unix
 http://jottings.thought.org   http://transfinite.thought.org
 
  Not entirely clear on you goal here, but if this is a repetitive thing any
 of the major scripting lang Perl,PHP,Python etc is easily up to the task.
 Otherwise OpenOffice merge works great too once you get the hang of it.
 

i'm thinking of a /bin/sh script.  if $1@ caputures a whole line,
that would grab, say 

123 Main Street

and $2@ would grab

York, PA 12345-6789



Actually, I'm trying to figure out something I can reuse if and
when necessary, including applying for a JOB!!  whatever

tx,

gary




 
 -- 
 Adam Vande More

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org