More comment and hidden option to solve problems when sending emails.
This commit is contained in:
parent
dbf96b8f59
commit
74e00c4d80
@ -143,6 +143,8 @@ class CMailFile
|
|||||||
$this->msgishtml = $msgishtml;
|
$this->msgishtml = $msgishtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->global->MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML)) $this->msgishtml=1; // To force to send everything with content type html.
|
||||||
|
|
||||||
// Detect images
|
// Detect images
|
||||||
if ($this->msgishtml)
|
if ($this->msgishtml)
|
||||||
{
|
{
|
||||||
@ -822,8 +824,9 @@ class CMailFile
|
|||||||
$strContent = preg_replace("/\r\n/si", "\n", $strContent);
|
$strContent = preg_replace("/\r\n/si", "\n", $strContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems bugged
|
// Make RFC2045 Compliant, split lines
|
||||||
$strContent = rtrim(wordwrap($strContent));
|
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content
|
||||||
|
$strContent = rtrim(wordwrap($strContent)); // TODO Using this method creates unexpected line break on text/plain content.
|
||||||
|
|
||||||
if ($this->msgishtml)
|
if ($this->msgishtml)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1188,7 +1188,9 @@ class SMTPs
|
|||||||
// Make RFC821 Compliant, replace bare linefeeds
|
// Make RFC821 Compliant, replace bare linefeeds
|
||||||
$strContent = preg_replace("/(?<!\r)\n/si", "\r\n", $strContent);
|
$strContent = preg_replace("/(?<!\r)\n/si", "\r\n", $strContent);
|
||||||
|
|
||||||
$strContent = rtrim(wordwrap($strContent, 75, "\r\n"));
|
// Make RFC2045 Compliant
|
||||||
|
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content
|
||||||
|
$strContent = rtrim(wordwrap($strContent, 75, "\r\n")); // TODO Using this method creates unexpected line break on text/plain content.
|
||||||
|
|
||||||
$this->_msgContent[$strType] = array();
|
$this->_msgContent[$strType] = array();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user