views:

16

answers:

0

I'm trying to use mikel gem mail on my 2.3.5 Rails App

http://github.com/mikel/mail

I have it working like this.

I've made a MailComHelper, made a method like this :

def self.welcome(user,password)
  @user = user
  m = Mail.new
  m.from    =  '[email protected]'
  m.to      = @user.email
  m.subject = 'welcome'
  m.body = 'The body'
  m.delivery_method :sendmail
  m.deliver!
end  

And it works, I receive the mail. But I wish I could use the old way of calling a view ( html.erb ) file and send that code has the body. I've read the documentation but haven't found a way to do it.

Has anyone found a way to do it?