浏览代码

Fixed return address of MDN receipts when having multiple identities (patch #530139)

teepe 23 年之前
父节点
当前提交
ca74ab022b
共有 2 个文件被更改,包括 13 次插入3 次删除
  1. 2 0
      ChangeLog
  2. 11 3
      functions/smtp.php

+ 2 - 0
ChangeLog

@@ -44,6 +44,8 @@ Version 1.2.6 -- CVS
   - Fixed small bug in handeling timezone (bug #536149)	
   - MDN message now RFC compatible (bug #537662)
   - Fixed html tables in printer_friendly_bottom.php (patch #542367)
+  - Fixed return address of MDN receipts when having multiple identities
+    (patch #530139)
 	
 Version 1.2.5 -- 22 February 2002
 ---------------------------------

+ 11 - 3
functions/smtp.php

@@ -912,11 +912,19 @@ function createPriorityHeaders($prio) {
 
 function createReceiptHeaders($receipt) {
 
-    GLOBAL $data_dir, $username;
+    GLOBAL $data_dir, $username, $identity;
 
     $receipt_headers = Array();
-    $from_addr = getPref($data_dir, $username, 'email_address');
-    $from = getPref($data_dir, $username, 'full_name');
+    if (isset($identity) && $identity != 'default') {
+        $from = getPref($data_dir, $username, 'full_name' . $identity);
+        $from_addr = getPref($data_dir, $username, 'email_address' . $identity);
+    } else {
+        $from = getPref($data_dir, $username, 'full_name');
+        $from_addr = getPref($data_dir, $username, 'email_address');
+    }
+    if ($from_addr == '') {
+        $from_addr = $popuser.'@'.$domain;
+    }
 
     if ($from == '') {
         $from = "<$from_addr>";