I'm following the Ruby on Rails Guide: ActionMailer Basics Section 2.7
Snippet:
Action Mailer will automatically send multipart emails if you have different templates for the same action. So, for our UserMailer example, if you have welcome_email.text.plain.erb and welcome_email.text.html.erb in app/views/user_mailer, Action Mailer will automatically send a multipart email with the HTML and text versions setup as different parts.
Well, I have both:
app/views/user_mailer/welcome_mail.text.html.erb
app/views/user_mailer/welcome_mail.text.plain.erb
app/models/user_mailer.rb
class UserMailer < ActionMailer::Base
def welcome_mail(user)
recipients user.email
from "
[email protected]"
subject "Thanks for registering"
body :user => user
end
end
Any luck?