# ActionMailer - help!

**URL:** <https://www.ruby-forum.com/t/actionmailer-help/81795>\
**Category:** Rails\
**Created:** [March 14, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/actionmailer-help/81795 "2006-03-14T18:58:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 14, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/actionmailer-help/81795/1 "2006-03-14T18:58:21Z")

</div>

I want to send myself an email when someone comments on my site. I  
setup actionmailer in the environment.rb file, but how do I actually  
send an email? Is it right after “post.save” or something? If so,  
what’s the syntax?

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![hreyaatnh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f17d59/32.png) [@hreyaatnh](https://www.ruby-forum.com/u/hreyaatnh)\
**Post date:** [March 14, 2006, 8:29pm UTC](https://www.ruby-forum.com/t/actionmailer-help/81795/2 "2006-03-14T20:29:25Z")

</div>

You will want to send the email after post.save since you only want to  
send notifications once the transaction completes successfully.

As for syntax, checkout [http://am.rubyonrails.org/classes/ActionMailer/](http://am.rubyonrails.org/classes/ActionMailer/)  
Base.html

On Tuesday, March 14, 2006, at 6:58 PM, hreyaatnh wrote:

> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Cheers!  
–Dave T.  
[http://devlists.com](http://devlists.com) - Email list management  
[http://palmsphere.com](http://palmsphere.com) - Apps for your hand-held
