Remove globals reference in Horde_Mime_Mdn
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 1 Feb 2010 23:21:32 +0000 (16:21 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 2 Feb 2010 00:44:19 +0000 (17:44 -0700)
framework/Mime/lib/Horde/Mime/Mdn.php
imp/lib/Ui/Message.php

index 79642fa..46049e7 100644 (file)
@@ -125,6 +125,7 @@ class Horde_Mime_Mdn
      * 'displayed'
      * 'deleted'
      * </pre>
+     * @param string $name        The name of the local server.
      * @param string $maildriver  The mail driver used to send the message.
      * @param array $mailparams   Any parameters the mail driver may need.
      * @param array $mod          The list of modifications.
@@ -139,7 +140,7 @@ class Horde_Mime_Mdn
      *
      * @throws Horde_Mime_Exception
      */
-    public function generate($action, $sending, $type, $maildriver,
+    public function generate($action, $sending, $type, $name, $maildriver,
                              $mailparams = array(), $mod = array(),
                              $err = array())
     {
@@ -200,7 +201,7 @@ class Horde_Mime_Mdn
 
         /* The second part is a machine-parseable description. */
         $part_two = new Horde_Mime_Part('message/disposition-notification');
-        $part_two_text = array('Reporting-UA: ' . $GLOBALS['conf']['server']['name'] . '; ' . $ua . "\n");
+        $part_two_text = array('Reporting-UA: ' . $name . '; ' . $ua . "\n");
         if (!empty($orig_recip)) {
             $part_two_text[] = 'Original-Recipient: rfc822;' . $orig_recip . "\n";
         }
index 3006815..9c71596 100644 (file)
@@ -114,7 +114,7 @@ class IMP_Ui_Message
         /* Send out the MDN now. */
         try {
             $mail_driver = IMP_Compose::getMailDriver();
-            $mdn->generate(false, $confirmed, 'displayed', $mail_driver['driver'], $mail_driver['params']);
+            $mdn->generate(false, $confirmed, 'displayed', $GLOBALS['conf']['server']['name'], $mail_driver['driver'], $mail_driver['params']);
             IMP_Maillog::log('mdn', $msg_id, 'displayed');
             $success = true;