src/Synapse/Email/AbstractSender.php
protected function filterThroughWhitelist($address)
    {
        $whitelist   = Arr::path($this->config, 'whitelist.list');
        $trapAddress = Arr::path($this->config, 'whitelist.trap');

        if (! is_array($whitelist)) {
            return $address;
        }

        list($name, $domain) = explode('@', $address);

        $addressWhitelisted = in_array($address, $whitelist);
        $domainWhitelisted  = in_array($domain, $whitelist);

        $whitelisted = ($addressWhitelisted or $domainWhitelisted);

        return $whitelisted ? $address : $this->injectIntoTrapAddress($address);
    }
protected function filterThroughWhitelist($address)
    {
        $whitelist   = Arr::path($this->config, 'whitelist.list');
        $trapAddress = Arr::path($this->config, 'whitelist.trap');

        if (! is_array($whitelist)) {
            return $address;
        }

        list($name, $domain) = explode('@', $address);

        $addressWhitelisted = in_array($address, $whitelist);
        $domainWhitelisted  = in_array($domain, $whitelist);

        $whitelisted = ($addressWhitelisted or $domainWhitelisted);

        return $whitelisted ? $address : $this->injectIntoTrapAddress($address);
    }
protected function filterThroughWhitelist ( $ address ) { $ whitelist = Arr :: path ( $ this -> config , 'whitelist.list' ) ; $ trapAddress = Arr :: path ( $ this -> config , 'whitelist.trap' ) ; if ( ! is_array ( $ whitelist ) ) { return $ address ; } list ( $ name , $ domain ) = explode ( '@' , $ address ) ; $ addressWhitelisted = in_array ( $ address , $ whitelist ) ; $ domainWhitelisted = in_array ( $ domain , $ whitelist ) ; $ whitelisted = ( $ addressWhitelisted or $ domainWhitelisted ) ; return $ whitelisted ? $ address : $ this -> injectIntoTrapAddress ( $ address ) ; }
Filter an email address through the domain and email address whitelists

If the email address is valid according to the whitelists, it is returned unchanged.
Otherwise the whitelist trap email address is returned.

@param  string $address Email address to filter
@return string          Filtered email address
Filter an email address through the domain and email address whitelists