markup/email.py: don't send email if EMAIL_HOST setting is None

This commit is contained in:
2020-02-28 17:11:23 -08:00
parent 97ef16e47a
commit dc85d784ab

View File

@ -85,6 +85,10 @@ def send_error_email(subj, einfo):
def send(frm, subj, msg):
if not EMAIL_HOST:
log.info(f'not sending email')
return
msg['From'] = 'Keen ProCatalog Markup Bot <markup@procatalog.io>'
msg['Reply-To'] = 'Keen ProCatalog Support <support@procatalog.io>'
msg['To'] = frm