mirror of
https://github.com/friendica/friendica
synced 2025-04-25 21:10:11 +00:00
mail() requires additional headers to be separated by CRLF
- Rewrite Email->getAdditionalMailHeaderString to have only one string concatenation statement
This commit is contained in:
parent
b1eba05e93
commit
4dc96daeb3
2 changed files with 10 additions and 9 deletions
|
@ -135,14 +135,15 @@ class Email implements IEmail
|
|||
$headerString = '';
|
||||
|
||||
foreach ($this->additionalMailHeader as $name => $values) {
|
||||
if (is_array($values)) {
|
||||
foreach ($values as $value) {
|
||||
$headerString .= "$name: $value\n";
|
||||
}
|
||||
} else {
|
||||
$headerString .= "$name: $values\n";
|
||||
if (!is_array($values)) {
|
||||
$values = [$values];
|
||||
}
|
||||
|
||||
foreach ($values as $value) {
|
||||
$headerString .= "$name: $value\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
return $headerString;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue