diff --git a/lib/Frs/Output/MailOutput.php b/lib/Frs/Output/MailOutput.php index a1a8a14..05de165 100644 --- a/lib/Frs/Output/MailOutput.php +++ b/lib/Frs/Output/MailOutput.php @@ -57,20 +57,6 @@ class MailOutput extends GenericOutput $this->headers[$key] = $value; } - /** - * Returns a header section (as string) of all currently set headers. - * - * @return string Header section. - */ - public function getHeaders() - { - $all_headers = ''; - foreach ($this->headers as $key=>$value) { - $all_headers .= $key . ': ' . $value . "\r\n"; - } - return $all_headers; - } - /** * Sets mail headers. If headers contain a Subject: line, the subject is set from that. * @@ -100,7 +86,7 @@ class MailOutput extends GenericOutput // TODO: Check if any recipients in the first place $this->transport->setRecipients($recipients); $this->transport->setSubject($this->subject); - $this->transport->setHeaders($this->getHeaders()); + $this->transport->setHeaders($this->headers); $this->transport->setContent($mailbody); return $this->transport->send(); } diff --git a/lib/Frs/Output/Transport/MailTransport.php b/lib/Frs/Output/Transport/MailTransport.php index a177d98..794a1c1 100644 --- a/lib/Frs/Output/Transport/MailTransport.php +++ b/lib/Frs/Output/Transport/MailTransport.php @@ -26,7 +26,10 @@ class MailTransport implements TransportInterface public function setHeaders($headers) { - $this->headers = $headers; + $this->headers = ''; + foreach ($headers as $key=>$value) { + $this->headers .= $key . ': ' . $value . "\r\n"; + } } public function transmit()