Revision 583bfaa0 logic/email_send.py

b/logic/email_send.py
62 62
    while attempts < 3:
63 63
        try:
64 64
            send_mail(subject, body, sender, [recipient])
65
            return
65
            return True
66 66
        except Exception as e:
67
            logger.warn("Error sending email: ", e)
67
            logger.error("Error sending email: %s", e)
68 68
        finally:
69 69
            attempts += 1
70

  
70 71
    logger.warn("Failed all %d attempts to send email, aborting", attempts)
72
    return False
71 73

  

Also available in: Unified diff