mailer/engine.py
def send_all():
    """
    Send all eligible messages in the queue.
    """

    for message in prioritize():
        if DontSendEntry.objects.has_address(message.to_address):
            print "skipping email to %s as on don't send list " % message.to_address
            MessageLog.objects.log(message, 2) # @@@ avoid using literal result code
            message.delete()
        else:
            print "sending message '%s' to %s" % (message.subject, message.to_address)
            MessageLog.objects.log(message, 1) # @@@ avoid using literal result code
            em = EmailMessage(subject=message.subject, body=message.message_body, from_email= message.from_address, to=message.to_address)
            em.send()
            message.delete()

    Send all eligible messages in the queue.
    
Send all eligible messages in the queue.
Send all eligible messages in the queue .
def send_all():
    for message in prioritize():
        if DontSendEntry.objects.has_address(message.to_address):
            print "skipping email to %s as on don't send list " % message.to_address
            MessageLog.objects.log(message, 2) 
            message.delete()
        else:
            print "sending message '%s' to %s" % (message.subject, message.to_address)
            MessageLog.objects.log(message, 1) 
            em = EmailMessage(subject=message.subject, body=message.message_body, from_email= message.from_address, to=message.to_address)
            em.send()
            message.delete()
def send_all ( ) : for message in prioritize ( ) : if DontSendEntry . objects . has_address ( message . to_address ) : print "skipping email to %s as on don't send list " % message . to_address MessageLog . objects . log ( message , 2 ) message . delete ( ) else : print "sending message '%s' to %s" % ( message . subject , message . to_address ) MessageLog . objects . log ( message , 1 ) em = EmailMessage ( subject = message . subject , body = message . message_body , from_email = message . from_address , to = message . to_address ) em . send ( ) message . delete ( )
Send all eligible messages in the queue.
Send all eligible messages in the queue .
"""
    Send all eligible messages in the queue.
    """ # @@@ avoid using literal result code # @@@ avoid using literal result code