Forum: Ruby on Rails Sending an email when a comment is posted

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
ryan (Guest)
on 2006-03-05 01:26
When a user posts a comment on my site, is there a way for me to be
notified via email?  I know this is pretty easy in php, i.e. mail()
function, but I'm looking for the equivalent in Rails.

Michael Gorsuch (Guest)
on 2006-03-05 01:35
(Received via mailing list)
Look into using ActionMailer.  That should do what you need.

I would also recommend using an Observer to send the email whenever a
new 'Comment' is saved.
Bob Silva (Guest)
on 2006-03-05 01:41
(Received via mailing list)
The AWDR book has an example to do just this in it. You DO have the book
don't you? :)

Bob Silva
This topic is locked and can not be replied to.