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!
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?
Bob S.
http://www.railtie.net/
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs