From 0804c27667ac5357c1061138ad29f1296065a57d Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Sat, 9 Feb 2002 22:56:04 +0000 Subject: [PATCH] Tylerisation git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2400 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/smtp.php | 56 ++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/functions/smtp.php b/functions/smtp.php index 03ad8a58..403f3bd7 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -777,33 +777,35 @@ function createPriorityHeaders($prio) { } function createReceiptHeaders($receipt) { - - $receipt_headers = Array(); - $from_addr = getPref($data_dir, $username, 'email_address'); - $from = getPref($data_dir, $username, 'full_name'); - - if ($from == '') { - $from = "<$from_addr>"; - } - else { - $from = '"' . encodeHeader($from) . "\" <$from_addr>"; - } - - /* On Delivery */ - if ( $receipt == 1 - || $receipt == 3 ) { - $receipt_headers["Return-Receipt-To"] = $from; - } - /* On Read */ - if ($receipt == 2 - || $receipt == 3 ) { - /* Pegasus Mail */ - $receipt_headers["X-Confirm-Reading-To"] = $from; - /* RFC 2298 */ - $receipt_headers["Disposition-Notification-To"] = $from; - } - return $receipt_headers; -} + + GLOBAL $data_dir, $username; + + $receipt_headers = Array(); + $from_addr = getPref($data_dir, $username, 'email_address'); + $from = getPref($data_dir, $username, 'full_name'); + + if ($from == '') { + $from = "<$from_addr>"; + } + else { + $from = '"' . encodeHeader($from) . "\" <$from_addr>"; + } + + /* On Delivery */ + if ( $receipt == 1 + || $receipt == 3 ) { + $receipt_headers["Return-Receipt-To"] = $from; + } + /* On Read */ + if ($receipt == 2 + || $receipt == 3 ) { + /* Pegasus Mail */ + $receipt_headers["X-Confirm-Reading-To"] = $from; + /* RFC 2298 */ + $receipt_headers["Disposition-Notification-To"] = $from; + } + return $receipt_headers; +} ?> -- 2.25.1