view gpp/mailer/management/commands/send_mail.py @ 502:9d096ceab0c0

For #240, make the login dialog a bit taller so no scroll bar appears on Firefox.
author Brian Neal <bgneal@gmail.com>
date Sat, 03 Dec 2011 03:25:04 +0000 (2011-12-03)
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()