Hi:
I am trying to use ar_mailer for sending mass mail.
The model file looks like
class Email < ActionMailer::ARMailer
def testmail
recipients "..."
from "....."
subject "TEST MAIL SUBJECT"
body "<br>TEST MAIL MESSAGE"
content_type "text/html"
end
end
where .... is the email address
I have made this entry in environment.rb
require ''action_mailer/ar_mailer''
and this in development.rb
ActionMailer::Base.delivery_method = :activerecord
(since im in development env)
i have the table called emails with structure
CREATE TABLE `emails` (
`from` varchar(255) NOT NULL,
`to` varchar(255) NOT NULL,
`last_send_attempt` int(11) NOT NULL default ''0'',
`mail` text NOT NULL,
`created_on` date NOT NULL
)
When i try to call the method testmail it returns me an error saying..
NoMethodError in UserController#test_mail
undefined method `create'' for Email:Class
Plz can anybody guide me in the right direction.
TIA..
Best Regards,
Priya Saini
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---