Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A simple actionmailer-based email-sender that we use for our farm newsletter.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
farm_mailer
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README
Rakefile
activation.jar
mail.jar
mailer.rb

README

1. Write the newsletter in TextEdit.

2A. Open terminal and run
  fold -s -w 72 > newsletter.txt
2B. Copy from TextEdit, paste in the terminal window.
    Press Ctrl-D to close newsletter.txt.

3. To see the available options, run
  /opt/jruby-1.3.1/bin/jruby /opt/farm_mailer/mailer.rb -h
   Usually, you'll run this:
  /opt/jruby-1.3.1/bin/jruby /opt/farm_mailer/mailer.rb -p password newsletter.txt

On Matt's new computer, Matt does this:
* put the folded newsletter in this directory's 'letters' directory
* Mail it:
  ruby mailer.rb -p <password> -l farm-email-list.txt letters/<date>.txt


Errors you might see:

 * /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionmailer-javamail-0.1.1/lib/java_mail/mailer.rb:19:in `open': javax.mail.AuthenticationFailedException: failed to connect (JavaMail::JavaMailError)
   -- the password is incorrect
Something went wrong with that request. Please try again.