Mercurial > public > sg101
view gpp/mailer/management/commands/send_mail.py @ 290:64c188a9d31f
Adding a legacy app to contain management commands to convert the old data to the new database format. This first commit has the import_old_users command.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 24 Dec 2010 05:28:58 +0000 |
parents | aef00df91165 |
children |
line wrap: on
line source
"""send_mail is a custom manage.py command for the mailer application. It is intended to be called from a cron job periodically to send out queued email in bulk. This avoids doing the mailing on the HTTP request processing. """ from django.core.management.base import NoArgsCommand import mailer class Command(NoArgsCommand): help = "Run periodically to send out queued email." def handle_noargs(self, **options): mailer.send_queued_mail()