From c92b0ea8f7a920c39dbb55c820b4fb0b5bf44de2 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Wed, 8 Jun 2016 10:01:17 +0000 Subject: [PATCH] Internal: Email generation - No need to force "Content-Transfer-Encoding: 8bit". The default is "quoted-printable" and works fine if the content is made of plain text. Leaving the 8bit encoding could work but in such a case, the statement should be: $oEncoder = new Swift_Mime_ContentEncoder_PlainContentEncoder('8bit', true /*canonicalize*/);... otherwise the lines get truncated at random places (CRLF is assumed while PHP EOL is made of CR only!) -This has an impact on plain text email only. SVN:trunk[4186] --- core/email.class.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/email.class.inc.php b/core/email.class.inc.php index 677615b63..3586d4569 100644 --- a/core/email.class.inc.php +++ b/core/email.class.inc.php @@ -57,9 +57,6 @@ class EMail { $this->m_aData = array(); $this->m_oMessage = Swift_Message::newInstance(); - - $oEncoder = new Swift_Mime_ContentEncoder_PlainContentEncoder('8bit'); - $this->m_oMessage->setEncoder($oEncoder); } /** @@ -197,6 +194,9 @@ class EMail $oMailer = Swift_Mailer::newInstance($oTransport); $aFailedRecipients = array(); + $this->m_oMessage->setMaxLineLength(0); +IssueLog::Info(__METHOD__.' '.$this->m_oMessage->getMaxLineLength()); +IssueLog::Info(__METHOD__.' '.$this->m_oMessage->toString()); $iSent = $oMailer->send($this->m_oMessage, $aFailedRecipients); if ($iSent === 0) {