I need to send a certain pdf to corporate users who fill out a form and not to users to use public domain email addresses like gmail. This is not spam email, users are filling out a form to get the pdf in email. Form mentions to use company email id, but some people still register using their personal email address.
Questions:
What is the best way to achieve this? I am using following and this keeps getting big as I add more providers:
“if “gmail” in sender_address or “hotmail” in sender_address or “yahoo” in sender_address or “aol.com” in sender_address:”
You can use
inin conjunction with alist, this is an example, don’t use this in production, it might break.