We found several users that have problem with notification emails due to wrong input of the party emails. As we have a validation for phone numbers I’m wonder if we should not have some for email also.
If found there is an email-validation library on PyPi that may do the job for us. I see it checks also the correctnes of DNS records and that is something that we may want to disable on systems without network access.
Like with phone numbers this library will be optional (but enabled by default on our docker image) so anyone that does not want to have the email validation can just skip the instalation of the library.
email validation is difficult but this library does not look bad.
For the DNS validation I think in case of timeout we should allow the user to skip it via a warning.
Also test_environment should be set when running tests.