+ function isBlockedEmail($email) {
+ // Check whitelist
+ $whitelist = $GLOBALS['email_whitelist'];
+ if (!is_null($whitelist) && is_array($whitelist)) {
+ if (!$this->_in_regex_array($email, $whitelist)) {
+ // Not in whitelist -> blocked
+ return TRUE;
+ }
+ }
+
+ // Check blacklist
+ $blacklist = $GLOBALS['email_blacklist'];
+ if (!is_null($blacklist) && is_array($blacklist)) {
+ if ($this->_in_regex_array($email, $blacklist)) {
+ // In blacklist -> blocked
+ return TRUE;
+ }
+ }
+
+ // Not blocked
+ return FALSE;
+ }
+