[email] Ensure hood name is lower case

This commit is contained in:
maike 2020-07-12 20:11:36 +02:00 committed by dl6tom
parent a6ce618ca8
commit 4ccd30cadf

View file

@ -33,7 +33,7 @@ async def main():
logger.error('No suitable message body')
exit(1)
# extract hood name from the envelope recipient address
hood_name = mail.get("Envelope-to").split('@')[0]
hood_name = mail.get("Envelope-to").split('@')[0].lower()
hood = await Hood.objects.get(name=hood_name)
email_row = await Email.objects.get(hood=hood)
body = {