Tylerisation
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 9 Feb 2002 22:56:04 +0000 (22:56 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 9 Feb 2002 22:56:04 +0000 (22:56 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2400 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php

index 03ad8a581ea4c3936e2af8e8aac3338f283eb92d..403f3bd7be7e8ff2da8b6e1e8ba23a830bd9fbd2 100644 (file)
@@ -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;
+}
 
 
 ?>