Issue Bug Closed

#42106swiftmaileradapter should ignore empty headers

Stefan Neufeind 10/18/12, 00:27 updated 10/02/18, 12:16

Description

There are cases when for example Direct Mail (by error) sends an empty header, in this case “Reply-To:”. That leads to an error like described in #27633 later with swiftmailer (Address in mailbox given [@localhost] does not comply with RFC 2822, 3.6.2).

In t3lib/mail/class.t3lib_mail_swiftmaileradapter.php inside setHeader() the headers are transfered over. Executing the line

$addressList = $this->parseAddresses($headerValue);

on the empty value leads to transfer the address to “@localhost” here.

Suggestion: trim $headerValue and check it is not empty before transfering it.

Reviews 0

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