# Sending emails in the background

**URL:** <https://www.ruby-forum.com/t/sending-emails-in-the-background/151766>\
**Category:** Rails\
**Created:** [October 25, 2008, 9:38am UTC](https://www.ruby-forum.com/t/sending-emails-in-the-background/151766 "2008-10-25T09:38:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [October 25, 2008, 9:38am UTC](https://www.ruby-forum.com/t/sending-emails-in-the-background/151766/1 "2008-10-25T09:38:51Z")

</div>

Hello,

Part of my application sends emails to many users notifying them with  
new post. For some reason it takes a while to send the emails, I guess  
because it’s locating and sending to the mail server. I would like to  
send emails asynchronously so user can see the post page without having  
to wait for all emails to be sent to other users.

what is the best way to do this?

I have been looking at AsyncMailer  
([DATANOISE.COM](http://www.datanoise.com/articles/2006/07/14/asynchronous-email-delivery))  
but i couldn’t get it to work especially that there isn’t enough  
documentation about it.

I’m considering also using something like backgroudrb plugin.

What is you opinion on that?

Thanks,

Tam

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [October 25, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/sending-emails-in-the-background/151766/2 "2008-10-25T20:45:43Z")

</div>

Take look at: [#129 Custom Daemon - RailsCasts](http://railscasts.com/episodes/129-custom-daemon)  
or  
[http://seattlerb.rubyforge.org/ar\_mailer/classes/ActionMailer/ARMailer.html](http://seattlerb.rubyforge.org/ar_mailer/classes/ActionMailer/ARMailer.html)
