Hello,
I have an email app running where I can send an email.
How do I pass form data to my email notifier?
here is my code that is not working.
<%= start_form_tag :action => “index” %>
<% if @flash[‘notice’] %>
<% end %>
Please enter your email address:
<%= text_field “post”, “email”, :size => 20, :value => @email,
:class=>“form” %>
<%= end_form_tag %>
class IndexController < ApplicationController
def index
@p = params[:index]
Notifier::deliver_signup_thanks(@p)
end
end
class Notifier < ActionMailer::Base
def signup_thanks§
Email header info MUST be added here
@recipients = “[email protected]”
@from = “[email protected]”
@subject = “Thank you for registering with our website”
Email body substitutions go here
@body = p.email
end
end