Issue Feature Closed

#20196Setting additional headers is not possible in class.t3lib_htmlmail.php

Christian Ehret 03/17/09, 16:48 updated 08/18/11, 16:48

Description

Is there any reason why function setHeaders() first clears $this->headers ?
It is not possible to use the public function add_header() and the “regular” way to send the mail with sendTheMail().

Couldn’t the line 464 $this->headers = ‘’; be removed?

A workaround is to sent the mail without using the send function:

$htmlMail = t3lib_div::makeInstance(‘t3lib_htmlmail’);
$htmlMail->start();

/* do something */

/* then send “manually” and set additional headers*/
$htmlMail->setHeaders();

$htmlMail->add_header(‘Envelope-From: <user>‘);</user>

$htmlMail->setContent();
$htmlMail->sendTheMail();
(issue imported from #M10710)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.