Actionmailer and Mass Mailing

Hello, I’m having a problem with actionmailer and mass (sort of)
mailing.

Basically, sometimes I need to notify every subscribed user in my app by
mail. Since the amout of users is very small (subscription is not
public), i thought that actionmailer would be enough.

When i need to send these email I do something like:

for user in Users.all
Mailer.deliver_notification(user.email)
end

It works sometimes, but i randomly get a “554 Policy Violation” error
from the mail server teling something about spam protection. I suppose
that every call to Mailer.deliver_something… opens and closes a
connection with the server, therefore the server is probably complaing
about that since I send almost 100 emails in a short period of time.
Sending a single mail with multiple recipients it’s not what I really
want unfortunately.

Is there a simple solution to this problem without using things like
ar_mailer or similar? Is it really a problem for the mail server to get
so many mails at once to send or should I complain about that with the
mail server owners?

I hope the problem is clear, my english is not so good.

Thanks in advance!

My guess is that you need to get your email account verified with the
smtp service provider to send that many emails. As far as I know, you
can send up to 500 a day through gmail, so that may be an option.

On Mon, Jan 11, 2010 at 9:36 AM, Serafino P. [email protected]
wrote:

  Mailer.deliver_notification(user.email)
Is there a simple solution to this problem without using things like

You received this message because you are subscribed to the Google G. “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


Curtis C.
[email protected]
home:http://curtiscooley.com
blog:http://ponderingobjectorienteddesign.blogspot.com

Leadership is a potent combination of strategy and character. But if
you must be without one, be without the strategy.
– H. Norman Schwarzkopf