Hello everyone, Besides django-mailer, has anyone had experience on how to queue e- mail? I'm writing an application that sends newsletters to roughly around 3000 subscribers and I don't want the hosting company - mediatemple - complaining about reaching their 500 e-mail per hour limit. Are there other ways to send them in batches? I would like to put some sort of counter that sends, say, 400 e-mails per hour, but keeps them all in a queue. Can someone please show me an example of Python code to achieve that? This is what I currently have:
(...) for user in users: subject = settings.EMAIL_SUBJECT_PREFIX + newsletter.title t = loader.get_template('newsletter/newsletter.html') c = Context({'email': user.email, 'media_url' : media_url, 'newsletter' : newsletter, 'newsletter_items' : newsletter_items}) msg = EmailMessage(subject, t.render(c), "x...@xxxxx.com", [user.email]) msg.content_subtype = "html" msg.send() (...) I'm sending e-mails one by one. Can I place a counter somewhere in there? Thanks for any help you can provide. Cheers, Fred --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---