Just posted a complete implementation here.
This is the basic help output:
$ ./bulk_email -h
Usage: bulk_email [options] 'Subject line of the email message in quotes'
Reads a list of email address from standard input.
Sends emails to all of them.
NOTE: If you use this program to send SPAM you will be generating
much negative Karma for yourself, so please DO NOT SPAM!!!
These are the configuration values that are required in the config
file:
FROM='from-email-address'
SMTP_ACCT='smtp-account'
SMTP_PASS='smtp-password'
Here are some optional configuration parameters. They may be overridden
in the config file. Note that by default we are using gmail!
SMTP_HOST='smtp-host' # default = smtp.gmail.com
SMTP_PORT=smtp-port # default = 587
SMTP_USE_TLS=True|False # default = True
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-x, --extra-help If specified, print out EXTRA help and exit
-v, --verbose If specified, print out information while processing.
--config=CONFIG The file that contains configuration info for the program.
By default, the program will look for a configuration file
in /home/gordy/.bulk_email.rc
--html=HTML The file that contains the HTML-formatted message
(required)
--plain=PLAIN The file that contains the plain-text message (optional,
but recommended)
-e, --embed If specified, scan the html copy for any <img /> tags.
Fetch the referenced image. Encode and embed it and
replace the src attribute of the <img /> with a cid:imagex
reference.
You can get extended output (which I won’t post here due to length) by using the -x option like bulk_email -x.
For the love of all that is holy and good, please DON’T SPAM!!!