def handle(self, *args, **options): """Send all applicable mailings""" try: recipients = send_all() self.stdout.write('mailings: sent to %d recipients.\n' % len(recipients)) except Exception: traceback.print_exc(file=sys.stdout) raise CommandError('mailings: There was an exception while sending mailings')
def handle(self, *args, **options): """Send all applicable mailings""" try: recipients = send_all() self.stdout.write('mailings: sent to %d recipients.\n' % len(recipients)) except Exception: traceback.print_exc(file=sys.stdout) raise CommandError( 'mailings: There was an exception while sending mailings')
def handle(self, *args, **options): """ Add delivery records for all applicable mailings, to keep them from being sent to entities. Useful when adding mailings to an existing project and avoiding flooding users with emails that might be outdated. """ try: recipients = send_all(fake=True) self.stdout.write('mailings: faked to %d recipients.\n' % len(recipients)) except Exception: traceback.print_exc(file=sys.stdout) raise CommandError('mailings: There was an exception while faking mailings')