From 7aaa14349b53f61d996e46cee4f8d6f8a3353293 Mon Sep 17 00:00:00 2001 From: teepe Date: Sun, 14 Apr 2002 15:23:56 +0000 Subject: [PATCH] Fixed return address of MDN receipts when having multiple identities (patch #530139) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2722 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ functions/smtp.php | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b4e683b..f6f1e70e 100644 --- a/ChangeLog +++ b/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 --------------------------------- diff --git a/functions/smtp.php b/functions/smtp.php index 00f3bcee..b553a62d 100644 --- a/functions/smtp.php +++ b/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>"; -- 2.25.1