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 03ad8a5..403f3bd 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;
+}
 
 
 ?>