# Better to use ruby to send email instead of rails context?

**URL:** <https://www.ruby-forum.com/t/better-to-use-ruby-to-send-email-instead-of-rails-context/143375>\
**Category:** Rails\
**Created:** [July 17, 2008, 8:32pm UTC](https://www.ruby-forum.com/t/better-to-use-ruby-to-send-email-instead-of-rails-context/143375 "2008-07-17T20:32:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![naijaguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/9e8a1a/32.png) [@naijaguy](https://www.ruby-forum.com/u/naijaguy)\
**Post date:** [July 17, 2008, 8:32pm UTC](https://www.ruby-forum.com/t/better-to-use-ruby-to-send-email-instead-of-rails-context/143375/1 "2008-07-17T20:32:30Z")

</div>

If my web app needs to send email notifications that are not time  
sensitive (e.g. they can wait a few minutes), do you think it’s better  
for my web app to put the message on a queue or in the db for another  
program (e.g. plain ruby) to load up and send the email? I know I can  
still send them asynchronously by putting them on a queue and then  
having a background process load up the rails context to send them, but  
I don’t know much about this and am wondering if I do that, would it be  
that much more scalable to just have plain ruby or any other standalone  
simple custom mailer program written in Java or whatever doing the  
emailing?

---

<div class="post-metadata">

**Author:** ![naijaguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/9e8a1a/32.png) [@naijaguy](https://www.ruby-forum.com/u/naijaguy)\
**Post date:** [July 17, 2008, 8:54pm UTC](https://www.ruby-forum.com/t/better-to-use-ruby-to-send-email-instead-of-rails-context/143375/2 "2008-07-17T20:54:53Z")

</div>

> standalone  
> simple custom mailer program written in Java or whatever doing the  
> emailing?

You may want to look at ar\_mailer

[http://blog.segment7.net/articles/2006/08/15/ar\_mailer](http://blog.segment7.net/articles/2006/08/15/ar_mailer)

-philip
