# Mailing lists in rails?

**URL:** <https://www.ruby-forum.com/t/mailing-lists-in-rails/87551>\
**Category:** Rails\
**Created:** [March 3, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/mailing-lists-in-rails/87551 "2007-03-03T19:16:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [March 3, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/mailing-lists-in-rails/87551/1 "2007-03-03T19:16:17Z")

</div>

I have a client that wants to send out a mass email to all of the  
registered users. I figured I would use ActionMailer for this, but is  
this suitable for mass emailing? Or is there another solution or a  
better way to do this?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [March 3, 2007, 11:16pm UTC](https://www.ruby-forum.com/t/mailing-lists-in-rails/87551/2 "2007-03-03T23:16:56Z")

</div>

It is possible, but slow. For every mail, ActiveMailer re-establishes  
the connection to the SMTP server (and this sometimes fails under  
load)

I made some changes to the ActiveMailer code to open a connection and  
then send the email, passing in the connection. I don’t have that  
code anymore, but it wasn’t hard to write once I knew what I needed to  
do.

20-30K messages is about where I’d start thinking about doing  
something different. Below that, you should be Ok with ActiveMailer.

The main problem I had was not Rails related, but Spam related. I had  
so many bounces due to various conditions - old email addresses, spam  
filters etc. You will get into trouble if you do this a lot and don’t  
process the bounce messages to disable email accounts for future  
mailings.

Bounce messages come in many forms - one email server actually has  
some comments from the programmer essentially saying: “The standard  
for bounce messages is too complex, so I’ll invent my own format  
that’s easier”. You have to handle this format as well as the  
standard formats, so it turns out to only be easier for that  
programmer. Can you tell I’m still grumpy?

On Mar 3, 10:16 am, Ben J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
