X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FEmailer.php;h=5e4d98d4c9e83e18ca46ebac609dd7e7d1b76658;hb=08d1e484e3ff5f624174b5a1620d0b38b3dcd548;hp=203f3b4f766c558690f9a63d58c65adf447a9744;hpb=e2b736d0a9b351965cc2310696dbbaeb4f19ebb2;p=friendica.git diff --git a/src/Util/Emailer.php b/src/Util/Emailer.php index 203f3b4f76..5e4d98d4c9 100644 --- a/src/Util/Emailer.php +++ b/src/Util/Emailer.php @@ -1,6 +1,6 @@ config = $config; @@ -65,7 +65,7 @@ class Emailer $this->siteEmailAddress = $this->config->get('config', 'sender_email'); if (empty($this->siteEmailAddress)) { - $hostname = $this->baseUrl->getHostname(); + $hostname = $this->baseUrl->getHost(); if (strpos($hostname, ':')) { $hostname = substr($hostname, 0, strpos($hostname, ':')); } @@ -141,9 +141,8 @@ class Emailer $countMessageId += count($value); } } - if ($countMessageId > 0) { + if ($countMessageId > 1) { $this->logger->warning('More than one Message-ID found - RFC violation', ['email' => $email]); - return false; } $email_textonly = false; @@ -164,9 +163,9 @@ class Emailer // generate a multipart/alternative message header $messageHeader = $email->getAdditionalMailHeaderString() . - "From: $fromName <{$fromAddress}>\n" . - "Reply-To: $fromName <{$replyTo}>\n" . - "MIME-Version: 1.0\n" . + "From: $fromName <{$fromAddress}>\r\n" . + "Reply-To: $fromName <{$replyTo}>\r\n" . + "MIME-Version: 1.0\r\n" . "Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\""; // assemble the final multipart message body with the text and html types included