Revision 583bfaa0 logic/callbacks.py

b/logic/callbacks.py
112 112
    try:
113 113
        msg = json.loads(message.body)
114 114

  
115
        email_send.send(sender=msg['frm'], recipient = msg['to'],
115
        sent = email_send.send(sender=msg['frm'], recipient = msg['to'],
116 116
                        body=msg['body'], subject=msg['subject'])
117
        message.channel.basic_ack(message.delivery_tag)
117

  
118
        if not sent:
119
            _logger.warn("Failed to send email to %s", msg['to'])
120
        else:
121
            message.channel.basic_ack(message.delivery_tag)
118 122
    except KeyError:
119 123
        _logger.error("Malformed incoming JSON, missing attributes: %s",
120 124
                      message.body)

Also available in: Unified diff