Code

Mailqueue addon
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Sep 2008 09:19:42 +0000 (09:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Sep 2008 09:19:42 +0000 (09:19 +0000)
-Implemented mail header

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12442 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc
gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc
gosa-plugins/mail/addons/mailqueue/header.tpl

index 8030879adfd3639af992b52262c21f706ca0f51e..6dd6bfe999ed9e391ca1a4d41d2d7beccb3bac37 100644 (file)
@@ -100,6 +100,7 @@ class mailqueue extends plugin
 
       /* Create table which displays the header informations */
       $data = $this->si_queue->header($entry,$server);
+      $data = preg_replace("/([^\s]*:)/","\n\\1",$data);
       $this->disp_header = $data;
       if($this->si_queue->is_error()){
         msg_dialog::display(_("Error"),msgPool::siError($this->si_queue->get_error()),ERROR_DIALOG);
index 3ef982717138712464b7d848950fbdbf8ab3d4ea..f73e2ca009eaff54a46cdd321945b47c37f9c36c 100644 (file)
@@ -131,22 +131,10 @@ class si_mailqueue extends gosaSupportDaemon
     $data = array();
     $data['msg_id'] = $msg_id;
     $res = $this->send_data("gosa_mailqueue_header",$server,$data,TRUE);
-  
-    $attrs = array(
-        "RECIPIENT",
-        "SENDER",
-        "SUBJECT");
-
-    $data = array();
-    if(isset($res['XML'])){
-      foreach($attrs as $attr){
-        $data[$attr] = "";
-        if(isset($res['XML'][0][$attr])){
-          $data[$attr] = $res['XML'][0][$attr][0]['VALUE'];
-        }
-      }  
+    if(isset($res['XML'][0]['MSG_HEADER'][0]['VALUE'])){
+      return($res['XML'][0]['MSG_HEADER'][0]['VALUE']);
     }
-    return($data);
+    return("");
   }
 
  
index fe88ee2d3fa363c3042644c842088736c5af2d2c..f5aaab53adb048c0ba66da61ae51a9482d720d73 100644 (file)
@@ -1,17 +1,5 @@
-<table>
-       <tr>
-               <td>{t}Sender{/t}&nbsp;:</td>
-               <td>{$header.SENDER}</td>
-       </tr>
-       <tr>
-               <td>{t}Recipient{/t}&nbsp;:</td>
-               <td>{$header.RECIPIENT}</td>
-       </tr>
-       <tr>
-               <td>{t}Subject{/t}&nbsp;:</td>
-               <td><i>{$header.SUBJECT}</i></td>
-       </tr>
-</table>
+<pre>{$header}
+</pre>
 
 <p class="seperator">&nbsp;</p>
 <div style='text-align:right; padding:5px;'>