Browse Source

Fix issue sending e-mails from incorrect FROM address if SMTP_UNIQUE_SENDER is set. This drops changes added through commits c59206c and e3ebb10 without removing the possibility to fix the sender through SMTP_UNIQUE_SENDER and SMTP_FROM_EMAIL - refs BT#11684

Yannick Warnier 8 years ago
parent
commit
94c5de8f6b
1 changed files with 1 additions and 3 deletions
  1. 1 3
      main/inc/lib/api.lib.php

+ 1 - 3
main/inc/lib/api.lib.php

@@ -7755,9 +7755,7 @@ function api_mail_html(
         $senderName = $platform_email['SMTP_FROM_NAME'];
         $senderEmail = $platform_email['SMTP_FROM_EMAIL'];
     }
-    $mail->SetFrom($defaultEmail, $defaultName);
-    $mail->From = $defaultEmail;
-    $mail->Sender = $defaultEmail;
+    $mail->SetFrom($senderEmail, $senderName);
     $mail->Subject = $subject;
     $mail->AltBody = strip_tags(
         str_replace('<br />', "\n", api_html_entity_decode($message))