فهرست منبع

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.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4186 a333f486-631f-4898-b8df-5754b55c2be0

romainq 9 سال پیش
والد
کامیت
0c00b76a80
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      core/email.class.inc.php

+ 3 - 3
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)
 		{