emailAddressPresent Flag Setting and Checking Email Suffix Validity
In my Organisation, not all users have a mailbox, while others are just mail enabled.
In order to define XPATH filters for those people who should be allowed into a distribution list, managed by the portal, I needed to set a flag.
This boolean flag defines if they could be mailed and therefore should belong to a distribution list.
A nice add on was the fact that it allowed me to check the mail suffix of the user as part of the import process. Only those suffixes defined in the array are allowed, only suffixes that the Exchange Organisation is authoritative for. This check exists, because sometimes people just add a new suffix, or make a typo – this bit of code highlights those events.