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