bgneal@180: """send_mail is a custom manage.py command for the mailer application. bgneal@180: It is intended to be called from a cron job periodically to send out queued bgneal@180: email in bulk. This avoids doing the mailing on the HTTP request processing. bgneal@180: """ bgneal@180: from django.core.management.base import NoArgsCommand bgneal@180: bgneal@180: import mailer bgneal@180: bgneal@180: bgneal@180: class Command(NoArgsCommand): bgneal@180: help = "Run periodically to send out queued email." bgneal@180: bgneal@180: def handle_noargs(self, **options): bgneal@180: mailer.send_queued_mail() bgneal@180: