about bulkmail

Bulkmail is a simple bulk mailing utility in Ruby. It takes a content file and a recipients file, and sends the content to each address listed in the recipients file. I wrote it to be as simple as possible, and as a basic alternative to commercial bulk-mailers. The free ones suck.

Usage

From the Command Line

bulkmail <options>

where the options are:

[--recipients, -r] recipients file name
[--content, -c] content file name
[--subject, -s] subject
[--from, -f] from
[--host, -h] smtp hostname (if none is specified localhost is presumed)
[--user, -u] user name (if authentication is needed)
[--password, -p] password (if authentication is needed)
[--auth, -a] authentication type
[--mime, -m] message mime type.

You can also include headers in the content file, provided they are followed by a blank line. For example:

Subject: My New Thing
Content-Type: text/html; charset=UTF-8

<html><body><h1>My New Thing!</h1></body></html>

From Ruby

BulkMail.send_bulk(sender, recipients, content, headers)

Where:

[sender] is the sender address. This address will also be used as in the form and to headers.
[recipients] is an array of email addresses
[content] is the message content
[headers] is an array containing message headers.

You can change server settings by using BulkMail.server_settings:

BulkMail.server_settings[:host] = 'mail.example.com'