On Wed, 2008-04-23 at 07:03 -0700, gorans wrote:
> Hi,
> 
> I've been sending out email to a list of around 8000 people on a
> monthly basis using django and was wondering whether there is a way to
> optimise the process.
> 
> Currently, I open a mail connection [ mail_connection =
> SMTPConnection(fail_silently=True) ] and then loop through each
> message calling the .send() method.
> 
> however, this takes about 2 seconds per message which is ridiculous!

Not to mention that with that many messages, there are going to be
errors -- some permanent, some transient. Django's email system isn't
designed to be a mass mailer on that scale. It's a whole other class of
problem.

> Is there are better way to do mass emailing to our subscribers?

One immediate possibility that jumps to mind is to set up some mailing
list software. Django sends email to the mailing list address and it
then goes out to everybody. You'll need to configure things so that
other people cannot post to the list, etc, but that's just a matter of
configuration.

If you use mailman (written in Python; well tested in production
settings), you could fairly easily write some code to synchronise the
mailman subscription list with whatever database table you are currently
using to store the subscribers, I suspect.

Another possibility is to use some sort of queueing system or service so
that the emails are inserted into the queue and then sent over an
extended period of time.

Regards,
Malcolm

> 
> Cheers
> 
> Goran
> 
> > 
> 
-- 
I've got a mind like a... a... what's that thing called? 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to