1
0
Fork 0

Fix phpmailer (Case sensitive Check)

This commit is contained in:
Philipp Holzer 2020-09-22 22:48:34 +02:00
commit e2b736d0a9
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
5 changed files with 196 additions and 3 deletions

View file

@ -134,6 +134,18 @@ class Emailer
return true;
}
// @see https://github.com/friendica/friendica/issues/9142
$countMessageId = 0;
foreach ($email->getAdditionalMailHeader() as $name => $value) {
if (strtolower($name) == 'message-id') {
$countMessageId += count($value);
}
}
if ($countMessageId > 0) {
$this->logger->warning('More than one Message-ID found - RFC violation', ['email' => $email]);
return false;
}
$email_textonly = false;
if (!empty($email->getRecipientUid())) {
$email_textonly = $this->pConfig->get($email->getRecipientUid(), 'system', 'email_textonly');