Have you seen this: http://gist.github.com/281420

On Jan 25, 2010, at 6:29 PM, Mikel Lindsaar wrote:
> 
> 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



-- 
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