diff --git a/src/Transport/Sendmail.php b/src/Transport/Sendmail.php index 412763ab..9be0137f 100644 --- a/src/Transport/Sendmail.php +++ b/src/Transport/Sendmail.php @@ -217,15 +217,14 @@ protected function prepareBody(Mail\Message $message) */ 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 + // strip the "subject" header $headers = clone $message->getHeaders(); - $headers->removeHeader('To'); $headers->removeHeader('Subject'); + + // On *nix platforms, strip the "to" header as well + if (!$this->isWindowsOs()) { + $headers->removeHeader('To'); + } return $headers->toString(); }