2
0
forked from Wavyzz/dolibarr

Fix use same encoding for all strings in email ack of payment.

This commit is contained in:
ldestailleur
2025-08-13 19:51:27 +02:00
parent b016944824
commit 447f9f1ea6
2 changed files with 10 additions and 8 deletions

View File

@@ -1709,7 +1709,9 @@ class CMailFile
//$out.= "From: ".$this->getValidAddress($this->addr_from,3,1).$this->eol;
$out .= "Content-Type: multipart/mixed;".$this->eol2." boundary=\"".$this->mixed_boundary."\"".$this->eol2;
$out .= "Content-Transfer-Encoding: 8bit".$this->eol2; // TODO Seems to be ignored. Header is 7bit once received.
if (!getDolGlobalString("MAIN_EMAIL_DISABLE_ADD_CONTENT_ENCODING_8BIT")) {
$out .= "Content-Transfer-Encoding: 8bit".$this->eol2; // TODO Seems to be ignored. Header is 7bit once received.
}
dol_syslog("CMailFile::write_smtpheaders smtp_header=\n".$out, LOG_DEBUG);
return $out;

View File

@@ -2103,15 +2103,15 @@ if ($ispaymentok) {
$content = "";
if (array_key_exists('MEM', $tmptag)) {
$url = $urlwithroot."/adherents/subscription.php?rowid=".((int) $tmptag['MEM']);
$content .= '<strong>'.$companylangs->trans("PaymentSubscription")."</strong><br><br>\n";
$content .= $companylangs->trans("MemberId").': <strong>'.$tmptag['MEM']."</strong><br>\n";
$content .= $companylangs->trans("Link").': <a href="'.$url.'">'.$url.'</a>'."<br>\n";
$content .= '<strong>'.$companylangs->transnoentitiesnoconv("PaymentSubscription")."</strong><br><br>\n";
$content .= $companylangs->transnoentitiesnoconv("MemberId").': <strong>'.$tmptag['MEM']."</strong><br>\n";
$content .= $companylangs->transnoentitiesnoconv("Link").': <a href="'.$url.'">'.$url.'</a>'."<br>\n";
} elseif (array_key_exists('INV', $tmptag)) {
$url = $urlwithroot."/compta/facture/card.php?id=".((int) $tmptag['INV']);
$content .= '<strong>'.$companylangs->trans("Payment")."</strong><br><br>\n";
$content .= $companylangs->trans("InvoiceId").': <strong>'.$tmptag['INV']."</strong><br>\n";
$content .= '<strong>'.$companylangs->transnoentitiesnoconv("Payment")."</strong><br><br>\n";
$content .= $companylangs->transnoentitiesnoconv("InvoiceId").': <strong>'.$tmptag['INV']."</strong><br>\n";
//$content.=$companylangs->trans("ThirdPartyId").': '.$tmptag['CUS']."<br>\n";
$content .= $companylangs->trans("Link").': <a href="'.$url.'">'.$url.'</a>'."<br>\n";
$content .= $companylangs->transnoentitiesnoconv("Link").': <a href="'.$url.'">'.$url.'</a>'."<br>\n";
} else {
$content .= $companylangs->transnoentitiesnoconv("NewOnlinePaymentReceived")."<br>\n";
}
@@ -2199,7 +2199,7 @@ if ($ispaymentok) {
$companylangs->loadLangs(array('main', 'members', 'bills', 'paypal', 'paybox', 'stripe'));
$sendto = $sendemail;
$from = getDolGlobalString('MAILING_EMAIL_FROM') ? $conf->global->MAILING_EMAIL_FROM : getDolGlobalString("MAIN_MAIL_EMAIL_FROM");
$from = getDolGlobalString('MAILING_EMAIL_FROM', getDolGlobalString("MAIN_MAIL_EMAIL_FROM"));
// Define $urlwithroot
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file