Hi,
I just installed ar_mailer. When i trigger an action that sends out
feature update mails to everyone, absolutely nothing gets stored in
emails. But instead i see in log/development.log that
Sent mail:
From: [email protected]
Subject: XXXXXXXXXXXXXXXXXXXXx
Mime-Version: 1.0
Content-Type: text/html; charset=utf-8
Am i missing something here, why are mails not getting stored in emails
table. Worse still in production mode, it doesnt even run.
The steps followed:
I have created a new model email.rb which contains
class Email < ActiveRecord::Base
end
- I have one more model mass_notifier which contains:
class MassNotifier < ActionMailer::ARMailer
def feature_updates(profile)
recipients = “#{profile.email}”
@from = “[email protected]”
@subject = “XXXXXXXXXXXXXXXXXXXXXX”
@body[:name] = profile.display_name
content_type “text/html”
end
end
-
In environment.rb
I have added require ‘action_mailer/ar_mailer’ after the config block
in -
In development.rb
config.action_mailer.delivery_method = :activerecord -
In controller:
i call MassNotifier.deliver_feature_updates(arguments)
Please suggest,
SG