Hi all,

Just letting you know we have a new DSL for Action Mailer.

class Notifier < ActionMailer::Base
  delivers_from("[email protected]")

  def signup_notification(recipient)
    @account = recipient

    attachments['an-image.jp'] = File.read("an-image.jpg")
    attachments['terms.pdf'] = {:content => generate_your_pdf_here() }

    mail(:to => recipient.email_address_with_name,
         :subject => "New account information")
  end
end

Notifier.signup_notification(recipient).deliver

You can read all about it at:

http://lindsaar.net/2010/1/26/new-actionmailer-api-in-rails-3

Mikel


-- 
http://lindsaar.net/

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to