mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-05 18:02:59 +00:00
Add improvements
This commit is contained in:
parent
874cef6a19
commit
5663e61791
1 changed files with 5 additions and 3 deletions
|
@ -91,13 +91,15 @@ function phpmailer_emailer_send_prepare(App $a, IEmail &$email)
|
||||||
// additional headers
|
// additional headers
|
||||||
if (!empty($email->getAdditionalMailHeader())) {
|
if (!empty($email->getAdditionalMailHeader())) {
|
||||||
foreach ($email->getAdditionalMailHeader() as $name => $values) {
|
foreach ($email->getAdditionalMailHeader() as $name => $values) {
|
||||||
// Skip the "Message-ID" header because PHP-Mailer is using its own
|
// Set the "Message-ID" header for PHP-Mailer directly
|
||||||
if ($name == 'Message-Id') {
|
if ($name == 'Message-Id') {
|
||||||
continue;
|
// implode all values to one entry, because there's only one value possible
|
||||||
}
|
$mailer->MessageID = trim(implode("", $values));
|
||||||
|
} else {
|
||||||
$mailer->addCustomHeader(trim($name), trim(implode("\n", $values)));
|
$mailer->addCustomHeader(trim($name), trim(implode("\n", $values)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($mailer->send()) {
|
if ($mailer->send()) {
|
||||||
$email = null;
|
$email = null;
|
||||||
|
|
Loading…
Reference in a new issue