add more log

This commit is contained in:
Son 2022-01-10 15:58:22 +01:00
parent 94bbade62e
commit c0067b7657
1 changed files with 3 additions and 0 deletions

View File

@ -534,12 +534,15 @@ def email_can_be_used_as_mailbox(email_address: str) -> bool:
email_address, check_deliverability=False, allow_smtputf8=False
).domain
except EmailNotValidError:
LOG.d("%s is invalid email address", email_address)
return False
if not domain:
LOG.d("no valid domain associated to %s", email_address)
return False
if SLDomain.get_by(domain=domain):
LOG.d("%s is a SL domain", email_address)
return False
from app.models import CustomDomain