Displaying 2 results from an estimated 2 matches for "comment_notif".
2005 Mar 10
6
problems with ActionMailer
...followed the tutorial on "How To Send Emails With Action
Mailer" <URL:
http://wiki.rubyonrails.com/rails/show/HowToSendEmailsWithActionMailer >,
I''ve generated a mailer -- "notifier.rb" -- and I''ve added the following
method to the mailer:
def comment_notification(comment)
@recipients = "email-J0of1frlU80@public.gmane.org"
@body = comment
end
I''m calling the mailer method from within my application with the
following lines:
@comment = Comment.new(@params[''comment''])
Notifier::deliver_comm...
2006 Aug 15
0
ar_mailer
...ARMailer
instead of ActionMailer::Base:
--- app/model/emailer.rb.orig 2006-08-10 13:16:33.000000000 -0700
+++ app/model/emailer.rb 2006-08-10 13:16:43.000000000 -0700
@@ -1,4 +1,4 @@
-class Emailer < ActionMailer::Base
+class Emailer < ActionMailer::ARMailer
def comment_notification(comment)
from comment.author.email
Edit config/environments/production.rb and set the delivery agent:
$ grep delivery_method config/environments/production.rb
ActionMailer::Base.delivery_method = :activerecord
Run ar_sendmail:
$ ar_sendmail
You can also run it from cron with...