Hi U can try this. User_notifier: def method_name(email) @recipients = email @content_type = "text/html" attachment :content_type => "application/octet-stream", :filename => "User Manual.pdf", :body => File.read("public/User Manual.pdf")
end Thanks Seenu On Wed, Oct 28, 2009 at 6:50 PM, Frantisek Psotka < rails-mailing-l...@andreas-s.net> wrote: > > something like: > > This is example procedure - assuming that i want to send few pdfs > attached with a html email - this is ordinary mailer method > > > class ExampleNotify < ActionMailer::Base > > def example(_user, _attachments) > recipients _user.email > from FROM > subject 'example' > content_type "text/html; charset=utf-8" > > body render_message('example') > > for a in _attachments > attachment :content_type => "application/pdf", :body => > File.read(File.join(RAILS_ROOT,DOCUMENT_DIR,a)), :filename=>a > end > end > > end > > -- > Posted via http://www.ruby-forum.com/. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---