def emailErrorMessage(subject,message):
if not getConstant('<STR_LIT>'):<EOL><INDENT>logger.info('<STR_LIT>')<EOL>return<EOL><DEDENT>send_from = getConstant('<STR_LIT>')<EOL>send_to = getConstant('<STR_LIT>')<EOL>if not send_from or not send_to:<EOL><INDENT>logger.error('<STR_LIT>')<EOL>return<EOL><DEDENT>try:<EOL><INDENT>send_mail(subject,message,<EOL>send_from,<EOL>[send_to], fail_silently=False)<EOL>logger.debug('<STR_LIT>')<EOL><DEDENT>except Exception as e:<EOL><INDENT>logger.error('<STR_LIT>' % e)<EOL><DEDENT>
Useful for sending error messages via email.