I am using ActionMailer to send comments submitted from the site. In
app/models/mailer.rb, I have:
def comments(name, email, comments_text, sent_at = Time.now)
@subject = ''Mailman#comments''
@body = { "name" => name, "email" => email,
"comments_text"
=> comments_text }
@recipients = admin-+LBmYUDmh58@public.gmane.org
@from = email
@sent_on = sent_at
@headers = {}
end
And in app/views/mailer/comments.rhtml:
From: <%= @name %>
Email: <%= @email %>
Comments:
<%= @comments_text %>
However, when I recieve an email, it looks like it was generated using this:
From: <%= @name %>
Email: <%= @email %>
Comments:
<%= @comments_text %>
Comments:
<%= @comments_text %>
In other words, the comments section is duplicated, but only the
comments section. What am I doing wrong here?