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.
1e2dd87a31c5d3e07adc9efa375f4dc4?d=identicon&s=25 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.

2c80e1b0837eec76d38d4f7fa1c15e87?d=identicon&s=25 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.
Af93ba6b6b59f22a8f37e8de5702ef98?d=identicon&s=25 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.