Skip to content
Snippets Groups Projects
Commit 0d1d68d5 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0

Conflicts:
	htdocs/admin/dict.php
	htdocs/product/price.php
parents 0e7da2cd 74e00c4d
No related branches found
No related tags found
No related merge requests found
...@@ -152,6 +152,8 @@ class CMailFile ...@@ -152,6 +152,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)
{ {
...@@ -531,8 +533,6 @@ class CMailFile ...@@ -531,8 +533,6 @@ class CMailFile
} }
else else
{ {
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port'), LOG_DEBUG);
$bounce = ''; // By default $bounce = ''; // By default
if (! empty($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F)) if (! empty($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F))
{ {
...@@ -545,6 +545,7 @@ class CMailFile ...@@ -545,6 +545,7 @@ class CMailFile
{ {
$bounce .= ($bounce?' ':'').'-ba'; $bounce .= ($bounce?' ':'').'-ba';
} }
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$bounce, LOG_DEBUG);
$this->message=stripslashes($this->message); $this->message=stripslashes($this->message);
...@@ -967,8 +968,9 @@ class CMailFile ...@@ -967,8 +968,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)
{ {
......
...@@ -1253,7 +1253,9 @@ class SMTPs ...@@ -1253,7 +1253,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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment