public function clearRecipientHeaders()
    {
        $headers = $this->swiftMessage->getHeaders();

        foreach ($headers->getAll() as $header) {
            if (!$header instanceof Swift_Mime_Headers_MailboxHeader) {
                continue;
            }
            if (in_array(strtolower($header->getFieldName()), $this->recipientHeaderNames)) {
                $headers->removeAll($header->getFieldName());
            }
        }

        return true;
    }
public function clearRecipientHeaders()
    {
        $headers = $this->swiftMessage->getHeaders();

        foreach ($headers->getAll() as $header) {
            if (!$header instanceof Swift_Mime_Headers_MailboxHeader) {
                continue;
            }
            if (in_array(strtolower($header->getFieldName()), $this->recipientHeaderNames)) {
                $headers->removeAll($header->getFieldName());
            }
        }

        return true;
    }
public function clearRecipientHeaders ( ) { $ headers = $ this -> swiftMessage -> getHeaders ( ) ; foreach ( $ headers -> getAll ( ) as $ header ) { if ( ! $ header instanceof Swift_Mime_Headers_MailboxHeader ) { continue ; } if ( in_array ( strtolower ( $ header -> getFieldName ( ) ) , $ this -> recipientHeaderNames ) ) { $ headers -> removeAll ( $ header -> getFieldName ( ) ) ; } } return true ; }
Remove all to, cc and bcc headers to that the target can be overwritten.

@return bool
Remove all to cc and bcc headers to that the target can be overwritten .