Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
This commit is contained in:
commit
0671f75417
@ -371,7 +371,9 @@ class CMailFile
|
||||
{
|
||||
// Use Swift Mailer library
|
||||
// ------------------------------------------
|
||||
|
||||
|
||||
$host = dol_getprefix('email');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/swift_required.php';
|
||||
// Create the message
|
||||
$this->message = Swift_Message::newInstance();
|
||||
@ -379,7 +381,7 @@ class CMailFile
|
||||
// Adding a trackid header to a message
|
||||
$headers = $this->message->getHeaders();
|
||||
$headers->addTextHeader('X-Dolibarr-TRACKID', $trackid);
|
||||
$headerID = time() . '.swiftmailer-dolibarr-' . $trackid . '@' . $conf->global->MAIN_MAIL_SMTP_SERVER;
|
||||
$headerID = time() . '.swiftmailer-dolibarr-' . $trackid . '@' . $host;
|
||||
$msgid = $headers->get('Message-ID');
|
||||
$msgid->setId($headerID);
|
||||
$headers->addIdHeader('References', $headerID);
|
||||
|
||||
@ -1217,7 +1217,7 @@ class SMTPs
|
||||
$host=preg_replace('@tcp://@i','',$host); // Remove prefix
|
||||
$host=preg_replace('@ssl://@i','',$host); // Remove prefix
|
||||
|
||||
$host=dol_getprefix('email').'-'.$host;
|
||||
$host=dol_getprefix('email');
|
||||
|
||||
//NOTE: Message-ID should probably contain the username of the user who sent the msg
|
||||
$_header .= 'Subject: ' . $this->getSubject() . "\r\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user