README.rdoc in adzap-ar_mailer-2.0.2 vs README.rdoc in adzap-ar_mailer-2.1.0

- old
+ new

@@ -52,27 +52,29 @@ Go to your Rails project: $ cd your_rails_project -Create a new migration: +Create the migration and model: - $ ar_sendmail --create-migration +This shows the options which are only the model name, which defaults to Email -You'll need to redirect this into a file. If you want a different name -provide the --table-name option. + ./script/generate ar_mailer -h -Create a new model: +Then run with defaults - $ ar_sendmail --create-model + ./script/generate ar_mailer -You'll need to redirect this into a file. If you want a different name -provide the --table-name option. +Or specify a custom model name -You'll need to be sure to set the From address for your emails. Something -like: + ./script/generate ar_mailer Newsletter +See Alternate Mail Storage if you use a custom model name + +In your mailer class methods you must be sure to set the From address for your emails. +Something like: + def list_send(recipient) from 'no_reply@example.com' # ... Edit config/environments/production.rb and set the delivery method: @@ -99,11 +101,14 @@ See <tt>ar_sendmail -h</tt> for full details. === Alternate Mail Storage -If you want to set the ActiveRecord model that emails will be stored in, -see ActionMailer::Base.email_class= +By default ar_mailer assumes you are using an ActiveRecord model called +Email to store the emails created before sending. If you want to change +this you alter it in an intializer like so: + + ActionMailer::Base.email_class = Newsletter === A Word on TLS If you are using Ruby >= 1.8.7, TLS will be enabled automatically if your SMTP server supports it. If you do not want it to automatically enabled then