Sending an email when a comment is posted

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.

Thanks!

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.

The AWDR book has an example to do just this in it. You DO have the book
don’t you? :slight_smile:

Bob S.
http://www.railtie.net/