Help with sending email form


#1

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’] %>

<%= @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 = “removed_email_address@domain.invalid”

@from = “removed_email_address@domain.invalid”

@subject = “Thank you for registering with our website”

Email body substitutions go here

@body = p.email

end

end