/** * Prepare header string from message * * @param Message $message * @return string */ protected function prepareHeaders(Message $message) { $headers = clone $message->getHeaders(); $headers->removeHeader('Bcc'); return $headers->toString(); }
/** * Prepare the textual representation of headers * * @param \Zend\Mail\Message $message * @return string */ protected function prepareHeaders(Mail\Message $message) { // On Windows, simply return verbatim if ($this->isWindowsOs()) { return $message->getHeaders()->toString(); } // On *nix platforms, strip the "to" header $headers = clone $message->getHeaders(); $headers->removeHeader('To'); $headers->removeHeader('Subject'); return $headers->toString(); }