public static function filterMessage($template, $message)
    {
        $recipients = $message->getTo();
        $blockedAddresses = static::checkForEmail($template, $recipients);

        if (!count($blockedAddresses)) {
            return null;
        }

        foreach ($recipients as $address => $name) {
            if (in_array($address, $blockedAddresses)) {
                unset($recipients[$address]);
            }
        }

        $message->setTo($recipients);
        return count($recipients) ? null : false;
    }
public static function filterMessage($template, $message)
    {
        $recipients = $message->getTo();
        $blockedAddresses = static::checkForEmail($template, $recipients);

        if (!count($blockedAddresses)) {
            return null;
        }

        foreach ($recipients as $address => $name) {
            if (in_array($address, $blockedAddresses)) {
                unset($recipients[$address]);
            }
        }

        $message->setTo($recipients);
        return count($recipients) ? null : false;
    }
public static function filterMessage ( $ template , $ message ) { $ recipients = $ message -> getTo ( ) ; $ blockedAddresses = static :: checkForEmail ( $ template , $ recipients ) ; if ( ! count ( $ blockedAddresses ) ) { return null ; } foreach ( $ recipients as $ address => $ name ) { if ( in_array ( $ address , $ blockedAddresses ) ) { unset ( $ recipients [ $ address ] ) ; } } $ message -> setTo ( $ recipients ) ; return count ( $ recipients ) ? null : false ; }
Filters a Illuminate\Mail\Message and removes blocked recipients.
If no recipients remain, false is returned. Returns null if mailing
should proceed.
@param  string $template
@param  Illuminate\Mail\Message $message
@return bool|null
Filters a Illuminate \ Mail \ Message and removes blocked recipients . If no recipients remain false is returned . Returns null if mailing should proceed .