MDN
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 9 Feb 2002 17:29:58 +0000 (17:29 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 9 Feb 2002 17:29:58 +0000 (17:29 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2394 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php
functions/mime.php
functions/smtp.php
locale/es_ES/LC_MESSAGES/squirrelmail.mo
locale/es_ES/LC_MESSAGES/squirrelmail.po
src/read_body.php

index d9be41fd39e78feae686509ff0296d42f0247f39..e04d5bcf37e153719c2fec79f9b4f06f3adf139b 100755 (executable)
@@ -102,10 +102,12 @@ function sqimap_mailbox_select ($imap_stream, $mailbox,
             }
         }
         return $r[1];
-    }
-    if ($auto_expunge) {
-        $tmp = sqimap_run_command($imap_stream, 'EXPUNGE',
+    } else {
+        if ($auto_expunge) {
+            $tmp = sqimap_run_command($imap_stream, 'EXPUNGE',
                                   false, $a, $b);
+        }
+        return( $read );
     }
 }
 
index e7016d790c6a5f227d2ff41ea2dcff4f82f5cb78..bf3ed74a46d4d4f14215bac33c9a3033b01f6dd4 100644 (file)
@@ -33,9 +33,8 @@ class message {
       more objects of type message.  See documentation in mime.txt for
       a better description of how this works.
     **/
-    var $header = '';
-    var $entities = array();
-    
+    var $header = '', $entities = array();
+
     function addEntity ($msg) {
         $this->entities[] = $msg;
     }
@@ -59,15 +58,15 @@ function mime_structure ($imap_stream, $header) {
     //
     // This should use sqimap_read_data instead of reading it itself
     //
-    $read = fgets ($imap_stream, 10000);
+    $read = fgets ($imap_stream, 9216);
     $bodystructure = '';
     while ( substr($read, 0, $lsid) <> $ssid &&
          !feof( $imap_stream ) ) {
         $bodystructure .= $read;
-        $read = fgets ($imap_stream, 10000);
+        $read = fgets ($imap_stream, 9216);
     }
     $read = $bodystructure;
-    
+
     // isolate the body structure and remove beginning and end parenthesis
     $read = trim(substr ($read, strpos(strtolower($read), 'bodystructure') + 13));
     $read = trim(substr ($read, 0, -1));
@@ -77,10 +76,10 @@ function mime_structure ($imap_stream, $header) {
         $read = trim(substr ($read, 1));
         $end = mime_match_parenthesis(0, $read);
     }
-    
+
     $msg = mime_parse_structure ($read, 0);
     $msg->header = $header;
-    
+
     return( $msg );
 }
 
@@ -120,15 +119,15 @@ function mime_parse_structure ($structure, $ent_id) {
  */
 function mime_increment_id ($id) {
 
-    if (strpos($id, ".")) {
-        $first = substr($id, 0, strrpos($id, "."));
-        $last = substr($id, strrpos($id, ".")+1);
+    if (strpos($id, '.')) {
+        $first = substr($id, 0, strrpos($id, '.'));
+        $last = substr($id, strrpos($id, '.')+1);
         $last++;
-        $new = $first . "." .$last;
+        $new = $first . '.' .$last;
     } else {
         $new = $id + 1;
     }
-    
+
     return $new;
 }
 
@@ -142,13 +141,13 @@ function mime_increment_id ($id) {
  */
 function mime_new_element_level ($id) {
 
-  if (!$id) {
-      $id = 0;
-  } else {
-      $id = $id . '.0';
-  }
+    if (!$id) {
+        $id = 0;
+    } else {
+        $id = $id . '.0';
+    }
 
-  return( $id );
+    return( $id );
 }
 
 function mime_get_element (&$structure, $msg, $ent_id) {
@@ -380,14 +379,15 @@ function mime_fetch_body($imap_stream, $id, $ent_id ) {
         $ent_id = 1;
     }
 
-    $cmd = "FETCH $id BODY[$ent_id]";
+    $cmd = "FETCH $id BODY[$ent_id] ";
     $data = sqimap_run_command ($imap_stream, $cmd, true, $response, $message);
-    $topline = array_shift($data);
-    while (! ereg('\\* [0-9]+ FETCH ', $topline) && $data) {
-        $topline = array_shift($data);
-    }
+
+    do {
+        $topline = array_shift( $data );
+    } while( $topline && $topline == '*' && !preg_match( '/\\* [0-9] FETCH.*/i', $topline )) ;
     $wholemessage = implode('', $data);
     if (ereg('\\{([^\\}]*)\\}', $topline, $regs)) {
+
         $ret = substr( $wholemessage, 0, $regs[1] );
         /*
             There is some information in the content info header that could be important
@@ -634,7 +634,7 @@ function formatBody($imap_stream, $message, $color, $wrap_at) {
         }
         
         $body .= "<SMALL><CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$ent_num&mailbox=$urlmailbox&showHeaders=1\">". _("Download this as a file") ."</A></CENTER><BR></SMALL>";
-        
+
         /** Display the ATTACHMENTS: message if there's more than one part **/
         $body .= "</TD></TR></TABLE>";
         if (isset($message->entities[0])) {
@@ -651,108 +651,109 @@ function formatBody($imap_stream, $message, $color, $wrap_at) {
  * A recursive function that returns a list of attachments with links
  * to where to download these attachments
  */
-function formatAttachments ($message, $ent_id, $mailbox, $id) {
-  global $where, $what;
-  global $startMessage, $color;
-  static $ShownHTML = 0;
+function formatAttachments($message, $ent_id, $mailbox, $id) {
+    global $where, $what;
+    global $startMessage, $color;
+    static $ShownHTML = 0;
 
-  $body = "";
-  if ($ShownHTML == 0) {
-        $ShownHTML = 1;
+    $body = '';
+    if ($ShownHTML == 0) {
 
+        $ShownHTML = 1;
         $body .= "<TABLE WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2 BORDER=0 BGCOLOR=\"$color[0]\"><TR>\n" .
-                 "<TH ALIGN=\"left\" BGCOLOR=\"$color[9]\"><B>\n" .
-                 _("Attachments") . ':' .
-                 "</B></TH></TR><TR><TD>\n" .
-                 "<TABLE CELLSPACING=0 CELLPADDING=1 BORDER=0>\n" .
-                 formatAttachments ($message, $ent_id, $mailbox, $id) .
-                 "</TABLE></TD></TR></TABLE>";
-
-        return( $body );
-  }
+                "<TH ALIGN=\"left\" BGCOLOR=\"$color[9]\"><B>\n" .
+                _("Attachments") . ':' .
+                "</B></TH></TR><TR><TD>\n" .
+                "<TABLE CELLSPACING=0 CELLPADDING=1 BORDER=0>\n" .
+                formatAttachments($message, $ent_id, $mailbox, $id) .
+                "</TABLE></TD></TR></TABLE>";
+
+    } else if ($message) {
+
+        if (!$message->entities) {
+
+            $type0 = strtolower($message->header->type0);
+            $type1 = strtolower($message->header->type1);
+            $name = decodeHeader($message->header->name);
+
+            if ($message->header->entity_id != $ent_id) {
+            $filename = decodeHeader($message->header->filename);
+            if (trim($filename) == '') {
+                if (trim($name) == '') {
+                    if ( trim( $message->header->id ) == '' )
+                        $display_filename = 'untitled-[' . $message->header->entity_id . ']' ;
+                    else
+                        $display_filename = 'cid: ' . $message->header->id;
+                    // $display_filename = 'untitled-[' . $message->header->entity_id . ']' ;
+                } else {
+                    $display_filename = $name;
+                    $filename = $name;
+                }
+            } else {
+                $display_filename = $filename;
+            }
 
-  if ($message) {
-     if (!$message->entities) {
-        $type0 = strtolower($message->header->type0);
-        $type1 = strtolower($message->header->type1);
-        $name = decodeHeader($message->header->name);
-
-        if ($message->header->entity_id != $ent_id) {
-           $filename = decodeHeader($message->header->filename);
-           if (trim($filename) == '') {
-              if (trim($name) == '') {
-                 if ( trim( $message->header->id ) == '' )
-                    $display_filename = 'untitled-[' . $message->header->entity_id . ']' ;
-                 else
-                    $display_filename = 'cid: ' . $message->header->id;
-                 // $display_filename = 'untitled-[' . $message->header->entity_id . ']' ;
-              } else {
-                 $display_filename = $name;
-                 $filename = $name;
-              }
-           } else {
-              $display_filename = $filename;
-           }
+            $urlMailbox = urlencode($mailbox);
+            $ent = urlencode($message->header->entity_id);
 
-           $urlMailbox = urlencode($mailbox);
-           $ent = urlencode($message->header->entity_id);
-
-           $DefaultLink =
-              "../src/download.php?startMessage=$startMessage&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent";
-           if ($where && $what)
-              $DefaultLink .= '&where=' . urlencode($where) . '&what=' . urlencode($what);
-           $Links['download link']['text'] = _("download");
-           $Links['download link']['href'] =
-               "../src/download.php?absolute_dl=true&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent";
-           $ImageURL = '';
-
-           /* this executes the attachment hook with a specific MIME-type.
-            * if that doens't have results, it tries if there's a rule
-            * for a more generic type. */
-           $HookResults = do_hook("attachment $type0/$type1", $Links,
-               $startMessage, $id, $urlMailbox, $ent, $DefaultLink,
-               $display_filename, $where, $what);
-           if(count($HookResults[1]) <= 1) {
-               $HookResults = do_hook("attachment $type0/*", $Links,
-               $startMessage, $id, $urlMailbox, $ent, $DefaultLink,  
-               $display_filename, $where, $what);
-           }
+            $DefaultLink =
+                "../src/download.php?startMessage=$startMessage&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent";
+            if ($where && $what) {
+                $DefaultLink .= '&where=' . urlencode($where) . '&what=' . urlencode($what);
+            }
+            $Links['download link']['text'] = _("download");
+            $Links['download link']['href'] =
+                "../src/download.php?absolute_dl=true&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent";
+            $ImageURL = '';
+
+            /* this executes the attachment hook with a specific MIME-type.
+                * if that doens't have results, it tries if there's a rule
+                * for a more generic type. */
+            $HookResults = do_hook("attachment $type0/$type1", $Links,
+                $startMessage, $id, $urlMailbox, $ent, $DefaultLink,
+                $display_filename, $where, $what);
+            if(count($HookResults[1]) <= 1) {
+                $HookResults = do_hook("attachment $type0/*", $Links,
+                $startMessage, $id, $urlMailbox, $ent, $DefaultLink,
+                $display_filename, $where, $what);
+            }
 
-           $Links = $HookResults[1];
-           $DefaultLink = $HookResults[6];
-
-           $body .= '<TR><TD>&nbsp;&nbsp;</TD><TD>' .
-                    "<A HREF=\"$DefaultLink\">$display_filename</A>&nbsp;</TD>" .
-                    '<TD><SMALL><b>' . show_readable_size($message->header->size) .
-                    '</b>&nbsp;&nbsp;</small></TD>' .
-                    "<TD><SMALL>[ $type0/$type1 ]&nbsp;</SMALL></TD>" .
-                    '<TD><SMALL>';
-           if ($message->header->description)
-              $body .= '<b>' . htmlspecialchars($message->header->description) . '</b>';
-           $body .= '</SMALL></TD><TD><SMALL>&nbsp;';
-
-
-           $SkipSpaces = 1;
-           foreach ($Links as $Val) {
-              if ($SkipSpaces) {
-                 $SkipSpaces = 0;
-              } else {
-                 $body .= '&nbsp;&nbsp;|&nbsp;&nbsp;';
-              }
-              $body .= '<a href="' . $Val['href'] . '">' .  $Val['text'] . '</a>';
-           }
+            $Links = $HookResults[1];
+            $DefaultLink = $HookResults[6];
+
+            $body .= '<TR><TD>&nbsp;&nbsp;</TD><TD>' .
+                        "<A HREF=\"$DefaultLink\">$display_filename</A>&nbsp;</TD>" .
+                        '<TD><SMALL><b>' . show_readable_size($message->header->size) .
+                        '</b>&nbsp;&nbsp;</small></TD>' .
+                        "<TD><SMALL>[ $type0/$type1 ]&nbsp;</SMALL></TD>" .
+                        '<TD><SMALL>';
+            if ($message->header->description) {
+                $body .= '<b>' . htmlspecialchars(_($message->header->description)) . '</b>';
+            }
+            $body .= '</SMALL></TD><TD><SMALL>&nbsp;';
 
-           unset($Links);
 
-           $body .= "</SMALL></TD></TR>\n";
-        }
-     } else {
-        for ($i = 0; $i < count($message->entities); $i++) {
-           $body .= formatAttachments ($message->entities[$i], $ent_id, $mailbox, $id);
+            $SkipSpaces = 1;
+            foreach ($Links as $Val) {
+                if ($SkipSpaces) {
+                    $SkipSpaces = 0;
+                } else {
+                    $body .= '&nbsp;&nbsp;|&nbsp;&nbsp;';
+                }
+                $body .= '<a href="' . $Val['href'] . '">' .  $Val['text'] . '</a>';
+            }
+
+            unset($Links);
+
+            $body .= "</SMALL></TD></TR>\n";
+            }
+        } else {
+            for ($i = 0; $i < count($message->entities); $i++) {
+                $body .= formatAttachments($message->entities[$i], $ent_id, $mailbox, $id);
+            }
         }
-     }
-     return( $body );
-  }
+    }
+    return( $body );
 }
 
 
index 86f474727fbd1c943d93c150306c6965d404125b..8ad4d243c6428bf3b0138731ff05959b8619fb44 100644 (file)
@@ -108,13 +108,13 @@ function expandRcptAddrs ($array) {
 }
 
 
-/* Attach the files that are due to be attached 
+/* Attach the files that are due to be attached
  */
 function attachFiles ($fp) {
     global $attachments, $attachment_dir, $username;
-    
+
     $length = 0;
-    
+
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
     if (isMultipart()) {
         foreach ($attachments as $info) {
@@ -124,21 +124,26 @@ function attachFiles ($fp) {
             else {
                 $filetype = 'application/octet-stream';
             }
-            
-            $header = '--'.mimeBoundary()."\r\n";
-            $header .= "Content-Type: $filetype; name=\"" .
-                $info['remotefilename'] . "\"\r\n";
-            $header .= "Content-Disposition: attachment; filename=\"" .
-                $info['remotefilename'] . "\"\r\n";
-                
-            /* Use 'rb' for NT systems -- read binary 
-             * Unix doesn't care -- everything's binary!  :-) 
+
+            $header = '--' . mimeBoundary() . "\r\n";
+            if ( isset($info['remotefilename']) && $info['remotefilename'] != '') {
+                $header .= "Content-Type: $filetype; name=\"" .
+                    $info['remotefilename'] . "\"\r\n";
+                $header .= "Content-Disposition: attachment; filename=\"" .
+                    $info['remotefilename'] . "\"\r\n";
+            } else {
+                $header .= "Content-Type: $filetype;\r\n";
+            }
+
+
+            /* Use 'rb' for NT systems -- read binary
+             * Unix doesn't care -- everything's binary!  :-)
              */
-            
+
             $filename = $hashed_attachment_dir . '/' . $info['localfilename'];
             $file = fopen ($filename, 'rb');
             if (substr($filetype, 0, 5) == 'text/' ||
-                $filetype == 'message/rfc822') {
+                $filetype == 'message/rfc822' || $filetype == 'message/disposition-notification' )  {
                 $header .= "\r\n";
                 fputs ($fp, $header);
                 $length += strlen($header);
@@ -190,12 +195,13 @@ function deleteAttachments() {
  */
 function mimeBoundary () {
     static $mimeBoundaryString;
-    
-    if ($mimeBoundaryString == "") {
-        $mimeBoundaryString = "----=_" . 
-            GenerateRandomString(60, '\'()+,-./:=?_', 7);
+
+    if ( !isset( $mimeBoundaryString ) ||
+         $mimeBoundaryString == '') {
+        $mimeBoundaryString = '----=_' . date( 'YmdHis' ) . '_' .
+                              mt_rand( 10000, 99999 );
     }
-    
+
     return $mimeBoundaryString;
 }
 
@@ -225,11 +231,12 @@ function timezone () {
 }
 
 /* Print all the needed RFC822 headers */
-function write822Header ($fp, $t, $c, $b, $subject, $more_headers) {
+function write822Header ($fp, $t, $c, $b, $subject, $MDN, $more_headers) {
     global $REMOTE_ADDR, $SERVER_NAME, $REMOTE_PORT;
     global $data_dir, $username, $popuser, $domain, $version, $useSendmail;
     global $default_charset, $HTTP_VIA, $HTTP_X_FORWARDED_FOR;
     global $REMOTE_HOST, $identity;
+    global $request_mdn;    
     
     /* Storing the header to make sure the header is the same
      * everytime the header is printed.
@@ -281,7 +288,7 @@ function write822Header ($fp, $t, $c, $b, $subject, $more_headers) {
         else {
             $received_from = $REMOTE_ADDR;
         }
-        
+
         if (isset($HTTP_VIA) || isset ($HTTP_X_FORWARDED_FOR)) {
             if ($HTTP_X_FORWARDED_FOR == '') {
                 $HTTP_X_FORWARDED_FOR = 'unknown';
@@ -301,6 +308,10 @@ function write822Header ($fp, $t, $c, $b, $subject, $more_headers) {
         $header .= "From: $from\r\n";
         $header .= "To: $to_list\r\n";    // Who it's TO
         
+        if (isset($request_mdn)) {
+            $more_headers["Disposition-Notification-To"] = "$from_addr";
+        }
+        
         /* Insert headers from the $more_headers array */
         if(is_array($more_headers)) {
             reset($more_headers);
@@ -325,14 +336,23 @@ function write822Header ($fp, $t, $c, $b, $subject, $more_headers) {
         }
         
         $header .= "X-Mailer: SquirrelMail (version $version)\r\n"; /* Identify SquirrelMail */
-        
+
         /* Do the MIME-stuff */
         $header .= "MIME-Version: 1.0\r\n";
         
         if (isMultipart()) {
-            $header .= 'Content-Type: multipart/mixed; boundary="';
-            $header .= mimeBoundary();
-            $header .= "\"\r\n";
+            if ($MDN) {
+                $header .= "Content-Type: multipart/report;\r\n";
+                $header .= "        report-type=disposition-notification;\r\n";
+                $header .= '        boundary="';
+                $header .= mimeBoundary();
+                $header .= "\"\r\n";
+            }
+            else {
+                $header .= 'Content-Type: multipart/mixed; boundary="';
+                $header .= mimeBoundary();
+                $header .= "\"\r\n";
+            }
         } else {
             if ($default_charset != '') {
                 $header .= "Content-Type: text/plain; charset=$default_charset\r\n";
@@ -393,7 +413,7 @@ function writeBody ($fp, $passedBody) {
 
 /* Send mail using the sendmail command
  */
-function sendSendmail($t, $c, $b, $subject, $body, $more_headers) {
+function sendSendmail($t, $c, $b, $subject, $body, $MDN, $more_headers) {
     global $sendmail_path, $popuser, $username, $domain;
     
     /* Build envelope sender address. Make sure it doesn't contain 
@@ -412,7 +432,7 @@ function sendSendmail($t, $c, $b, $subject, $body, $more_headers) {
         $fp = popen (escapeshellcmd("$sendmail_path -t -f$envelopefrom"), "w");
     }
     
-    $headerlength = write822Header ($fp, $t, $c, $b, $subject, $more_headers);
+    $headerlength = write822Header ($fp, $t, $c, $b, $subject, $MDN, $more_headers);
     $bodylength = writeBody($fp, $body);
     
     pclose($fp);
@@ -431,7 +451,7 @@ function smtpReadData($smtpConnection) {
     }
 }
 
-function sendSMTP($t, $c, $b, $subject, $body, $more_headers) {
+function sendSMTP($t, $c, $b, $subject, $body, $MDN, $more_headers) {
     global $username, $popuser, $domain, $version, $smtpServerAddress, 
         $smtpPort, $data_dir, $color, $use_authenticated_smtp, $identity, 
         $key, $onetimepad;
@@ -477,7 +497,7 @@ function sendSMTP($t, $c, $b, $subject, $body, $more_headers) {
         if (errorCheck($tmp, $smtpConnection)!=5) {
             return(0);
         }
-        
+
         fputs($smtpConnection, base64_encode ($username) . "\r\n");
         $tmp = fgets($smtpConnection, 1024);
         if (errorCheck($tmp, $smtpConnection)!=5) {
@@ -516,20 +536,20 @@ function sendSMTP($t, $c, $b, $subject, $body, $more_headers) {
     for ($i = 0; $i < count($bcc); $i++) {
         fputs($smtpConnection, "RCPT TO: $bcc[$i]\r\n");
         $tmp = fgets($smtpConnection, 1024);
-        if (errorCheck($tmp, $smtpConnection)!=5) { 
+        if (errorCheck($tmp, $smtpConnection)!=5) {
             return(0);
         }
     }
-    
+
     /* Lets start sending the actual message */
     fputs($smtpConnection, "DATA\r\n");
     $tmp = fgets($smtpConnection, 1024);
     if (errorCheck($tmp, $smtpConnection)!=5) {
         return(0);
     }
-    
+
     /* Send the message */
-    $headerlength = write822Header ($smtpConnection, $t, $c, $b, $subject, $more_headers);
+    $headerlength = write822Header ($smtpConnection, $t, $c, $b, $subject, $MDN, $more_headers);
     $bodylength = writeBody($smtpConnection, $body);
     
     fputs($smtpConnection, ".\r\n"); /* end the DATA part */
@@ -655,22 +675,24 @@ function errorCheck($line, $smtpConnection, $verbose = false) {
     return $err_num;
 }
 
-function sendMessage($t, $c, $b, $subject, $body, $reply_id, $prio = 3) {
-    global $useSendmail, $msg_id, $is_reply, $mailbox, $onetimepad;
-    global $data_dir, $username, $domain, $key, $version, $sent_folder, $imapServerAddress, $imapPort;
-    global $default_use_priority;
-    global $more_headers;
+function sendMessage($t, $c, $b, $subject, $body, $reply_id, $MDN, $prio = 3) {
+    global $useSendmail, $msg_id, $is_reply, $mailbox, $onetimepad,
+           $data_dir, $username, $domain, $key, $version, $sent_folder, $imapServerAddress, $imapPort,
+           $default_use_priority,
+           $more_headers,
+           $request_mdn;
+
     $more_headers = Array();
     
-    do_hook("smtp_send");
-    
+    do_hook('smtp_send');
+
     $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 1);
-    
+
     if (isset($reply_id) && $reply_id) {
         sqimap_mailbox_select ($imap_stream, $mailbox);
         sqimap_messages_flag ($imap_stream, $reply_id, $reply_id, 'Answered');
-        
-        /* Insert In-Reply-To and References headers if the 
+
+        /* Insert In-Reply-To and References headers if the
          * message-id of the message we reply to is set (longer than "<>")
          * The References header should really be the old Referenced header
          * with the message ID appended, but it can be only the message ID too.
@@ -684,29 +706,28 @@ function sendMessage($t, $c, $b, $subject, $body, $reply_id, $prio = 3) {
     if ($default_use_priority) {
         $more_headers = array_merge($more_headers, createPriorityHeaders($prio));
     }
-    
+
     /* In order to remove the problem of users not able to create
      * messages with "." on a blank line, RFC821 has made provision
      * in section 4.5.2 (Transparency).
      */
     $body = ereg_replace("\n\\.", "\n..", $body);
     $body = ereg_replace("^\\.", "..", $body);
-    
+
     /* this is to catch all plain \n instances and
      * replace them with \r\n.  All newlines were converted
      * into just \n inside the compose.php file.
      */
     $body = ereg_replace("\n", "\r\n", $body);
-    
+
     if ($useSendmail) {
-        $length = sendSendmail($t, $c, $b, $subject, $body, $more_headers);
+        $length = sendSendmail($t, $c, $b, $subject, $body, $MDN, $more_headers);
     } else {
-        $length = sendSMTP($t, $c, $b, $subject, $body, $more_headers);
+        $length = sendSMTP($t, $c, $b, $subject, $body, $MDN, $more_headers);
     }
-    
     if (sqimap_mailbox_exists ($imap_stream, $sent_folder)) {
         sqimap_append ($imap_stream, $sent_folder, $length);
-        write822Header ($imap_stream, $t, $c, $b, $subject, $more_headers);
+        write822Header ($imap_stream, $t, $c, $b, $subject, $MDN, $more_headers);
         writeBody ($imap_stream, $body);
         sqimap_append_done ($imap_stream);
     }
@@ -714,28 +735,29 @@ function sendMessage($t, $c, $b, $subject, $body, $reply_id, $prio = 3) {
     /* Delete the files uploaded for attaching (if any).
      * only if $length != 0 (if there was no error)
      */
-    if ($length)
+    if ($length) {
         ClearAttachments();
-    
+    }
+
     return $length;
 }
 
 function createPriorityHeaders($prio) {
     $prio_headers = Array();
-    $prio_headers["X-Priority"] = $prio;
-    
+    $prio_headers['X-Priority'] = $prio;
+
     switch($prio) {
-    case 1: $prio_headers["Importance"] = "High";
-        $prio_headers["X-MSMail-Priority"] = "High";
+    case 1: $prio_headers['Importance'] = 'High';
+        $prio_headers['X-MSMail-Priority'] = 'High';
         break;
-        
-    case 3: $prio_headers["Importance"] = "Normal";
-        $prio_headers["X-MSMail-Priority"] = "Normal";
+
+    case 3: $prio_headers['Importance'] = 'Normal';
+        $prio_headers['X-MSMail-Priority'] = 'Normal';
         break;
-        
+
     case 5:
-        $prio_headers["Importance"] = "Low";
-        $prio_headers["X-MSMail-Priority"] = "Low";
+        $prio_headers['Importance'] = 'Low';
+        $prio_headers['X-MSMail-Priority'] = 'Low';
         break;
     }
     return  $prio_headers;
index ea5ff06c1c318ac62ac2bbc952a935629bd7ba9c..375e8d6901d36bcd69fdaa307fa767684511b22b 100644 (file)
Binary files a/locale/es_ES/LC_MESSAGES/squirrelmail.mo and b/locale/es_ES/LC_MESSAGES/squirrelmail.mo differ
index fcf6c81438068eb2bd769739e9aaac9798991102..1154ab7845ed8f79b20ae94abe8aa5e396a1f717 100644 (file)
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: $Id$\n"
-"POT-Creation-Date: 2002-02-04 15:51+0100\n"
-"PO-Revision-Date: 2002-01-19 12:19CET\n"
+"POT-Creation-Date: 2002-02-09 09:08+0100\n"
+"PO-Revision-Date: 2002-02-09 09:15GMT+1\n"
 "Last-Translator: Philippe Mingo <philippe@squirrelmail.org>\n"
 "Language-Team: Spanish <squirrelmail-i18n@lists.sourceforge.net>\n"
 "MIME-Version: 1.0\n"
@@ -41,20 +41,20 @@ msgstr "Informaci
 msgid "Source"
 msgstr "Origen"
 
-#: squirrelmail/functions/mailbox_display.php:567
+#: squirrelmail/functions/mailbox_display.php:570
 #: squirrelmail/plugins/filters/options.php:88
 #: squirrelmail/src/addrbook_search_html.php:82
 #: squirrelmail/src/compose.php:309 squirrelmail/src/download.php:132
 #: squirrelmail/src/download.php:139
 #: squirrelmail/src/options_highlight.php:325
 #: squirrelmail/src/printer_friendly_bottom.php:96
-#: squirrelmail/src/search.php:331
+#: squirrelmail/src/search.php:339
 msgid "To"
 msgstr "Para"
 
 #: squirrelmail/plugins/filters/options.php:91
 #: squirrelmail/src/addrbook_search_html.php:84
-#: squirrelmail/src/options_highlight.php:328 squirrelmail/src/search.php:330
+#: squirrelmail/src/options_highlight.php:328 squirrelmail/src/search.php:338
 msgid "Cc"
 msgstr "Cc"
 
@@ -85,10 +85,10 @@ msgstr "en"
 msgid "All address books"
 msgstr "Todos los libros de direcciones"
 
-#: squirrelmail/functions/page_header.php:134
+#: squirrelmail/functions/page_header.php:130
 #: squirrelmail/src/addrbook_search.php:191
 #: squirrelmail/src/addrbook_search_html.php:151
-#: squirrelmail/src/search.php:196
+#: squirrelmail/src/search.php:202
 msgid "Search"
 msgstr "Buscar"
 
@@ -98,23 +98,23 @@ msgid "List all"
 msgstr "Listar todos"
 
 #: squirrelmail/src/addrbook_search.php:213
-#: squirrelmail/src/addrbook_search_html.php:177
+#: squirrelmail/src/addrbook_search_html.php:182
 #, c-format
 msgid "Unable to list addresses from %s"
 msgstr "Imposible listar direcciones desde %s"
 
 #: squirrelmail/src/addrbook_search.php:239
-#: squirrelmail/src/addrbook_search_html.php:205
+#: squirrelmail/src/addrbook_search_html.php:207
 msgid "Your search failed with the following error(s)"
 msgstr "La busqueda falló con los siguientes errores"
 
 #: squirrelmail/src/addrbook_search.php:159
 #: squirrelmail/src/addrbook_search.php:246
-#: squirrelmail/src/addrbook_search_html.php:210
+#: squirrelmail/src/addrbook_search_html.php:212
 msgid "No persons matching your search was found"
 msgstr "No se encontró una persona con esos datos"
 
-#: squirrelmail/src/addrbook_search_html.php:223
+#: squirrelmail/src/addrbook_search_html.php:225
 msgid "Return"
 msgstr "Volver"
 
@@ -203,29 +203,29 @@ msgstr "No se puede mover/copiar el archivo. Archivo no adjuntado"
 msgid "Original Message"
 msgstr "Mensaje Original"
 
-#: squirrelmail/functions/mailbox_display.php:583
+#: squirrelmail/functions/mailbox_display.php:586
 #: squirrelmail/plugins/filters/options.php:97
 #: squirrelmail/src/compose.php:305 squirrelmail/src/download.php:130
 #: squirrelmail/src/download.php:135
 #: squirrelmail/src/options_highlight.php:334
 #: squirrelmail/src/options_order.php:40
 #: squirrelmail/src/printer_friendly_bottom.php:101
-#: squirrelmail/src/search.php:328
+#: squirrelmail/src/search.php:336
 msgid "Subject"
 msgstr "Asunto"
 
-#: squirrelmail/functions/mailbox_display.php:569
+#: squirrelmail/functions/mailbox_display.php:572
 #: squirrelmail/plugins/filters/options.php:85
 #: squirrelmail/src/compose.php:306 squirrelmail/src/download.php:131
 #: squirrelmail/src/download.php:137
 #: squirrelmail/src/options_highlight.php:322
 #: squirrelmail/src/options_order.php:38
 #: squirrelmail/src/printer_friendly_bottom.php:95
-#: squirrelmail/src/search.php:329
+#: squirrelmail/src/search.php:337
 msgid "From"
 msgstr "De"
 
-#: squirrelmail/functions/mailbox_display.php:577
+#: squirrelmail/functions/mailbox_display.php:580
 #: squirrelmail/src/compose.php:307 squirrelmail/src/download.php:133
 #: squirrelmail/src/download.php:141 squirrelmail/src/options_order.php:39
 #: squirrelmail/src/printer_friendly_bottom.php:100
@@ -269,7 +269,7 @@ msgstr "Agregar"
 msgid "Delete selected attachments"
 msgstr "Borrar Adjuntos Seleccionados"
 
-#: squirrelmail/functions/page_header.php:128 squirrelmail/src/compose.php:609
+#: squirrelmail/functions/page_header.php:124 squirrelmail/src/compose.php:609
 #: squirrelmail/src/compose.php:613 squirrelmail/src/compose.php:617
 msgid "Addresses"
 msgstr "Direcciones"
@@ -282,7 +282,7 @@ msgstr "Guardar Borrador"
 msgid "Priority"
 msgstr "Prioridad"
 
-#: squirrelmail/plugins/administrator/defines.php:189
+#: squirrelmail/plugins/administrator/defines.php:191
 #: squirrelmail/plugins/calendar/functions.php:98
 #: squirrelmail/src/compose.php:629 squirrelmail/src/read_body.php:424
 msgid "High"
@@ -293,7 +293,7 @@ msgstr "Alta"
 msgid "Normal"
 msgstr "Normal"
 
-#: squirrelmail/plugins/administrator/defines.php:186
+#: squirrelmail/plugins/administrator/defines.php:188
 #: squirrelmail/src/compose.php:631 squirrelmail/src/read_body.php:430
 msgid "Low"
 msgstr "Baja"
@@ -325,7 +325,7 @@ msgstr "Ver un texto adosado"
 msgid "View message"
 msgstr "Ver el mensaje"
 
-#: squirrelmail/functions/mime.php:623 squirrelmail/src/download.php:41
+#: squirrelmail/functions/mime.php:636 squirrelmail/src/download.php:41
 #: squirrelmail/src/image.php:44 squirrelmail/src/vcard.php:196
 msgid "Download this as a file"
 msgstr "Bajar este mensaje como un archivo"
@@ -338,7 +338,7 @@ msgstr "Nombre de Carpeta Invalido. Por favor, seleccione uno diferente."
 msgid "Click here to go back"
 msgstr "Pulse aquí para volver"
 
-#: squirrelmail/functions/page_header.php:130 squirrelmail/src/folders.php:29
+#: squirrelmail/functions/page_header.php:126 squirrelmail/src/folders.php:29
 #: squirrelmail/src/left_main.php:238
 msgid "Folders"
 msgstr "Carpetas"
@@ -403,7 +403,7 @@ msgstr "No se encontraron carpetas"
 msgid "Delete Folder"
 msgstr "Borrar Carpeta"
 
-#: squirrelmail/functions/mailbox_display.php:540
+#: squirrelmail/functions/mailbox_display.php:543
 #: squirrelmail/plugins/filters/options.php:154
 #: squirrelmail/plugins/mail_fetch/options.php:163
 #: squirrelmail/plugins/mail_fetch/options.php:170
@@ -448,7 +448,7 @@ msgstr "Nuevo nombre:"
 msgid "Submit"
 msgstr "Enviar"
 
-#: squirrelmail/functions/page_header.php:136
+#: squirrelmail/functions/page_header.php:132
 #: squirrelmail/plugins/listcommands/setup.php:37 squirrelmail/src/help.php:91
 msgid "Help"
 msgstr "Ayuda"
@@ -466,31 +466,31 @@ msgstr ""
 msgid "Some or all of the help documents are not present!"
 msgstr "Algunos o todos los documentos de ayuda no fueron encontrados"
 
-#: squirrelmail/src/help.php:170 squirrelmail/src/help.php:193
+#: squirrelmail/src/help.php:169 squirrelmail/src/help.php:191
 msgid "Table of Contents"
 msgstr "Tabla de Contenidos"
 
-#: squirrelmail/functions/mailbox_display.php:743
 #: squirrelmail/functions/mailbox_display.php:746
 #: squirrelmail/functions/mailbox_display.php:749
+#: squirrelmail/functions/mailbox_display.php:752
 #: squirrelmail/plugins/delete_move_next/setup.php:149
 #: squirrelmail/plugins/delete_move_next/setup.php:151
-#: squirrelmail/src/help.php:187 squirrelmail/src/help.php:191
+#: squirrelmail/src/help.php:185 squirrelmail/src/help.php:189
 #: squirrelmail/src/read_body.php:495 squirrelmail/src/read_body.php:497
 msgid "Previous"
 msgstr "Anterior"
 
-#: squirrelmail/functions/mailbox_display.php:744
 #: squirrelmail/functions/mailbox_display.php:747
 #: squirrelmail/functions/mailbox_display.php:750
+#: squirrelmail/functions/mailbox_display.php:753
 #: squirrelmail/plugins/delete_move_next/setup.php:154
 #: squirrelmail/plugins/delete_move_next/setup.php:156
-#: squirrelmail/src/help.php:195 squirrelmail/src/help.php:198
+#: squirrelmail/src/help.php:193 squirrelmail/src/help.php:196
 #: squirrelmail/src/read_body.php:501 squirrelmail/src/read_body.php:503
 msgid "Next"
 msgstr "Siguiente"
 
-#: squirrelmail/src/help.php:221
+#: squirrelmail/src/help.php:219
 msgid "Top"
 msgstr "Arriba"
 
@@ -498,10 +498,11 @@ msgstr "Arriba"
 msgid "Viewing an image attachment"
 msgstr "Viendo una imagen adjunta"
 
-#: squirrelmail/functions/page_header.php:107
+#: squirrelmail/functions/mailbox_display.php:529
+#: squirrelmail/functions/page_header.php:103
 #: squirrelmail/plugins/mail_fetch/options.php:137
 #: squirrelmail/plugins/mail_fetch/options.php:214
-#: squirrelmail/src/left_main.php:73
+#: squirrelmail/src/left_main.php:73 squirrelmail/src/search.php:305
 msgid "INBOX"
 msgstr "ENTRADA"
 
@@ -812,18 +813,17 @@ msgstr "Memorizar B
 msgid "Disabled"
 msgstr "Desactivado"
 
-#: squirrelmail/functions/page_header.php:132
+#: squirrelmail/functions/page_header.php:128
 #: squirrelmail/plugins/filters/options.php:62
 #: squirrelmail/plugins/newmail/newmail_opt.php:34
-#: squirrelmail/plugins/spamcop/options.php:28
 #: squirrelmail/plugins/translate/options.php:94
-#: squirrelmail/src/options.php:165 squirrelmail/src/options_highlight.php:62
+#: squirrelmail/src/options.php:198 squirrelmail/src/options_highlight.php:62
 #: squirrelmail/src/options_identities.php:44
 #: squirrelmail/src/options_order.php:31
 msgid "Options"
 msgstr "Opciones"
 
-#: squirrelmail/src/options.php:113 squirrelmail/src/options.php:268
+#: squirrelmail/src/options.php:146 squirrelmail/src/options.php:297
 #: squirrelmail/src/options_highlight.php:62
 msgid "Message Highlighting"
 msgstr "Resaltado de Mensajes"
@@ -974,7 +974,7 @@ msgstr "Ponerla por omisi
 msgid "Move Up"
 msgstr "Mover Arriba"
 
-#: squirrelmail/src/options.php:125 squirrelmail/src/options.php:284
+#: squirrelmail/src/options.php:158 squirrelmail/src/options.php:313
 #: squirrelmail/src/options_order.php:31
 msgid "Index Order"
 msgstr "Orden de índice"
@@ -987,7 +987,7 @@ msgstr "Checkbox"
 msgid "Flags"
 msgstr "Indicadores"
 
-#: squirrelmail/functions/mailbox_display.php:589
+#: squirrelmail/functions/mailbox_display.php:592
 #: squirrelmail/src/options_order.php:42
 msgid "Size"
 msgstr "Tamaño"
@@ -1085,31 +1085,31 @@ msgstr "Preceder firma con '-- '"
 msgid "Signature"
 msgstr "Firma"
 
-#: squirrelmail/src/options.php:101 squirrelmail/src/options.php:252
+#: squirrelmail/src/options.php:134 squirrelmail/src/options.php:281
 msgid "Personal Information"
 msgstr "Información Personal"
 
-#: squirrelmail/src/options.php:107 squirrelmail/src/options.php:260
+#: squirrelmail/src/options.php:140 squirrelmail/src/options.php:289
 msgid "Display Preferences"
 msgstr "Preferencias de Pantalla"
 
-#: squirrelmail/src/options.php:119 squirrelmail/src/options.php:276
+#: squirrelmail/src/options.php:152 squirrelmail/src/options.php:305
 msgid "Folder Preferences"
 msgstr "Preferencias de Carpetas"
 
-#: squirrelmail/src/options.php:235
+#: squirrelmail/src/options.php:264
 msgid "Successfully Saved Options"
 msgstr "Opciones Actualizadas"
 
-#: squirrelmail/src/options.php:240
+#: squirrelmail/src/options.php:269
 msgid "Refresh Folder List"
 msgstr "Actualizar Carpetas"
 
-#: squirrelmail/src/options.php:242
+#: squirrelmail/src/options.php:271
 msgid "Refresh Page"
 msgstr "Actualizar Página"
 
-#: squirrelmail/src/options.php:254
+#: squirrelmail/src/options.php:283
 msgid ""
 "This contains personal information about yourself such as your name, your "
 "email address, etc."
@@ -1117,7 +1117,7 @@ msgstr ""
 "Esta opción contiene su información personal, como su nombre, su dirección "
 "de correo electrónico, etc..."
 
-#: squirrelmail/src/options.php:262
+#: squirrelmail/src/options.php:291
 msgid ""
 "You can change the way that SquirrelMail looks and displays information to "
 "you, such as the colors, the language, and other settings."
@@ -1125,7 +1125,7 @@ msgstr ""
 "Puede cambiar el aspecto SquirreMail y la forma de mostrarla información, "
 "como el idioma, los colores, y otras configuraciones."
 
-#: squirrelmail/src/options.php:270
+#: squirrelmail/src/options.php:299
 msgid ""
 "Based upon given criteria, incoming messages can have different background "
 "colors in the message list.  This helps to easily distinguish who the "
@@ -1136,14 +1136,13 @@ msgstr ""
 "distinguir fácilmente de quien provienen. (Especialmente para listas de "
 "correo)."
 
-#: squirrelmail/src/options.php:278
-msgid ""
-"These settings change the way your folders are displayed and manipulated."
+#: squirrelmail/src/options.php:307
+msgid "These settings change the way your folders are displayed and manipulated."
 msgstr ""
 "Estas opciones cambian la forma en la que se muestran y manipulan las "
 "carpetas."
 
-#: squirrelmail/src/options.php:286
+#: squirrelmail/src/options.php:315
 msgid ""
 "The order of the message index can be rearranged and changed to contain the "
 "headers in any order you want."
@@ -1243,47 +1242,47 @@ msgstr "Se ha producido un error contactando con el servidor."
 msgid "Contact your administrator for help."
 msgstr "Contacte con su administrador."
 
-#: squirrelmail/src/search.php:232
+#: squirrelmail/src/search.php:237
 msgid "edit"
 msgstr "editar"
 
-#: squirrelmail/src/search.php:239 squirrelmail/src/search.php:278
+#: squirrelmail/src/search.php:244 squirrelmail/src/search.php:283
 msgid "search"
 msgstr "buscar"
 
-#: squirrelmail/src/search.php:242
+#: squirrelmail/src/search.php:247
 msgid "delete"
 msgstr "borrar"
 
-#: squirrelmail/src/search.php:270
+#: squirrelmail/src/search.php:275
 msgid "save"
 msgstr "guardar"
 
-#: squirrelmail/src/search.php:281
+#: squirrelmail/src/search.php:286
 msgid "forget"
 msgstr "olvidar"
 
-#: squirrelmail/src/search.php:290
+#: squirrelmail/src/search.php:295
 msgid "Current Search"
 msgstr "Búsqueda Actual"
 
-#: squirrelmail/src/search.php:326
+#: squirrelmail/src/search.php:334
 msgid "Body"
 msgstr "Cuerpo"
 
-#: squirrelmail/src/search.php:327
+#: squirrelmail/src/search.php:335
 msgid "Everywhere"
 msgstr "Todos lados"
 
-#: squirrelmail/src/search.php:354 squirrelmail/src/search.php:377
+#: squirrelmail/src/search.php:362 squirrelmail/src/search.php:391
 msgid "Search Results"
 msgstr "Resultado de la búsqueda"
 
-#: squirrelmail/src/search.php:367
+#: squirrelmail/src/search.php:382
 msgid "No Messages found"
 msgstr "No se encontraron mensajes"
 
-#: squirrelmail/functions/page_header.php:120 squirrelmail/src/signout.php:72
+#: squirrelmail/functions/page_header.php:116 squirrelmail/src/signout.php:72
 msgid "Sign Out"
 msgstr "Desconectarse"
 
@@ -1587,7 +1586,7 @@ msgstr "j/m/Y"
 #: squirrelmail/functions/db_prefs.php:59
 #: squirrelmail/functions/db_prefs.php:102
 #: squirrelmail/functions/db_prefs.php:105
-#: squirrelmail/functions/db_prefs.php:243
+#: squirrelmail/functions/db_prefs.php:251
 #, c-format
 msgid "Preference database error (%s). Exiting abnormally"
 msgstr "Archivo de preferencias %s no encontrado. Saliendo anormalmente."
@@ -1706,7 +1705,7 @@ msgstr "N
 #: squirrelmail/functions/imap_messages.php:195
 #: squirrelmail/functions/imap_messages.php:440
 #: squirrelmail/functions/imap_messages.php:495
-#: squirrelmail/functions/mailbox_display.php:902
+#: squirrelmail/functions/mailbox_display.php:905
 msgid "(no subject)"
 msgstr "(sin asunto)"
 
@@ -1726,19 +1725,19 @@ msgstr "(remitente desconocido)"
 msgid "No Messages Found"
 msgstr "No se Encontraron Mensajes"
 
-#: squirrelmail/functions/imap_search.php:181
-#: squirrelmail/functions/imap_search.php:189
+#: squirrelmail/functions/imap_search.php:187
+#: squirrelmail/functions/imap_search.php:195
 msgid "Found"
 msgstr "Encontrado"
 
-#: squirrelmail/functions/imap_search.php:181
-#: squirrelmail/functions/imap_search.php:189
+#: squirrelmail/functions/imap_search.php:187
+#: squirrelmail/functions/imap_search.php:195
 msgid "messages"
 msgstr "mensajes"
 
 #: squirrelmail/functions/mailbox_display.php:156
 msgid "A"
-msgstr ""
+msgstr "C"
 
 #: squirrelmail/functions/mailbox_display.php:429
 msgid "THIS FOLDER IS EMPTY"
@@ -1752,53 +1751,53 @@ msgstr "Mover seleccionados a:"
 msgid "Transform Selected Messages"
 msgstr "Marcar mensajes seleccionados como"
 
-#: squirrelmail/functions/mailbox_display.php:532
+#: squirrelmail/functions/mailbox_display.php:535
 msgid "Move"
 msgstr "Mover"
 
-#: squirrelmail/functions/mailbox_display.php:536
+#: squirrelmail/functions/mailbox_display.php:539
 msgid "Expunge"
 msgstr "Purgar"
 
-#: squirrelmail/functions/mailbox_display.php:536
+#: squirrelmail/functions/mailbox_display.php:539
 msgid "mailbox"
 msgstr "buzón"
 
-#: squirrelmail/functions/mailbox_display.php:538
+#: squirrelmail/functions/mailbox_display.php:541
 msgid "Read"
 msgstr "Leído"
 
-#: squirrelmail/functions/mailbox_display.php:539
+#: squirrelmail/functions/mailbox_display.php:542
 msgid "Unread"
 msgstr "No Leído"
 
-#: squirrelmail/functions/mailbox_display.php:635
+#: squirrelmail/functions/mailbox_display.php:638
 msgid "Toggle All"
 msgstr "Cambia Todos"
 
-#: squirrelmail/functions/mailbox_display.php:663
+#: squirrelmail/functions/mailbox_display.php:666
 msgid "Unselect All"
 msgstr "De-seleccionar Todos"
 
-#: squirrelmail/functions/mailbox_display.php:665
+#: squirrelmail/functions/mailbox_display.php:668
 msgid "Select All"
 msgstr "Seleccionar Todos"
 
-#: squirrelmail/functions/mailbox_display.php:682
+#: squirrelmail/functions/mailbox_display.php:685
 #, c-format
 msgid "Viewing Messages: <B>%s</B> to <B>%s</B> (%s total)"
 msgstr "Viendo Mensajes: del <B>%s</B> al <B>%s</B> (total %s)"
 
-#: squirrelmail/functions/mailbox_display.php:684
+#: squirrelmail/functions/mailbox_display.php:687
 #, c-format
 msgid "Viewing Message: <B>%s</B> (1 total)"
 msgstr "Viendo Mensaje: <b>%s</b> (total 1)"
 
-#: squirrelmail/functions/mailbox_display.php:869
+#: squirrelmail/functions/mailbox_display.php:872
 msgid "Paginate"
 msgstr "Paginar"
 
-#: squirrelmail/functions/mailbox_display.php:876
+#: squirrelmail/functions/mailbox_display.php:879
 msgid "Show All"
 msgstr "Todos"
 
@@ -1808,21 +1807,29 @@ msgstr ""
 "Se produjo un error al descodificar la estructura MIME. ¡Notifíquelo como un "
 "error del programa!"
 
-#: squirrelmail/functions/mime.php:430
+#: squirrelmail/functions/mime.php:440
 msgid ""
 "Body retrieval error. The reason for this is most probably that the message "
 "is malformed. Please help us making future versions better by submitting "
 "this message to the developers knowledgebase!"
 msgstr ""
-"Error de recuperación: El motivo de este error se deba probablemente a que "
+"Error de recuperación: El motivo de este error se debe probablemente a que "
 "el mensaje está mal formado. Por favor, ayúdenos a depurar versiones futuras "
 "enviando este mensaje al centro de desarrollo."
 
-#: squirrelmail/functions/mime.php:432
+#: squirrelmail/functions/mime.php:442
+msgid "Submit message"
+msgstr "Enviar mensaje"
+
+#: squirrelmail/functions/mime.php:444
+msgid "Command:"
+msgstr "Comando:"
+
+#: squirrelmail/functions/mime.php:445
 msgid "Response:"
 msgstr "Contestación:"
 
-#: squirrelmail/functions/mime.php:433
+#: squirrelmail/functions/mime.php:446
 #: squirrelmail/plugins/calendar/event_create.php:118
 #: squirrelmail/plugins/calendar/event_delete.php:38
 #: squirrelmail/plugins/calendar/event_edit.php:101
@@ -1830,19 +1837,19 @@ msgstr "Contestaci
 msgid "Message:"
 msgstr "Mensaje:"
 
-#: squirrelmail/functions/mime.php:434
+#: squirrelmail/functions/mime.php:447
 msgid "FETCH line:"
-msgstr "Recojer línea:"
+msgstr "Línea contestada:"
 
-#: squirrelmail/functions/mime.php:652
+#: squirrelmail/functions/mime.php:665
 msgid "Attachments"
 msgstr "Ficheros adjuntos"
 
-#: squirrelmail/functions/mime.php:691
+#: squirrelmail/functions/mime.php:704
 msgid "download"
 msgstr "descargar"
 
-#: squirrelmail/functions/mime.php:978
+#: squirrelmail/functions/mime.php:999
 #: squirrelmail/plugins/calendar/event_create.php:53
 #: squirrelmail/plugins/calendar/event_create.php:116
 #: squirrelmail/plugins/calendar/event_delete.php:36
@@ -1852,7 +1859,7 @@ msgstr "descargar"
 msgid "Title:"
 msgstr "Título:"
 
-#: squirrelmail/functions/mime.php:1148
+#: squirrelmail/functions/mime.php:1169
 msgid "sec_remove_eng.png"
 msgstr "sec_remove_es_ES.png"
 
@@ -1875,11 +1882,11 @@ msgstr "Si"
 msgid "No"
 msgstr "No"
 
-#: squirrelmail/functions/page_header.php:114
+#: squirrelmail/functions/page_header.php:110
 msgid "Current Folder"
 msgstr "Carpeta Actual"
 
-#: squirrelmail/functions/page_header.php:126
+#: squirrelmail/functions/page_header.php:122
 msgid "Compose"
 msgstr "Componer"
 
@@ -2051,23 +2058,10 @@ msgstr ""
 "que NO se use su servicio."
 
 #: squirrelmail/plugins/filters/filters.php:560
-msgid "FREE - orbz.gst-group.co.uk - Inputs only."
-msgstr "GRATUITO - orbz.gst-group.co.uk - Solo entradas."
-
-#: squirrelmail/plugins/filters/filters.php:568
-msgid "FREE - orbz.gst-group.co.uk - Outputs only."
-msgstr "GRATUITO - orbz.gst-group.co.uk - Solo salidas."
-
-#: squirrelmail/plugins/filters/filters.php:576
-msgid ""
-"FREE - orbz.gst-group.co.uk - mailservers that refuse or bounce email "
-"addressed to postmaster@<theirdomain>."
+msgid "FREE - SPAMhaus - A list of well-known SPAM sources."
 msgstr ""
-"GRATUITO - La lista orbz.gst-group.co.uk incluye, además de enlaces "
-"abiertos, servidores que niegan el paso a mensajes para la dirección "
-"postmaster@<su_dominio>."
 
-#: squirrelmail/plugins/filters/filters.php:584
+#: squirrelmail/plugins/filters/filters.php:568
 #, c-format
 msgid ""
 "FREE, for now - SPAMCOP - An interesting solution that lists servers that "
@@ -2279,8 +2273,7 @@ msgid "You must make a choice"
 msgstr "Debe hacer alguna elección"
 
 #: squirrelmail/plugins/squirrelspell/sqspell_functions.php:375
-msgid ""
-"You can either delete your dictionary or type in the old password. Not both."
+msgid "You can either delete your dictionary or type in the old password. Not both."
 msgstr ""
 "Puede borrar su diccionario o introducir la contraseña deldiccionario "
 "antíguo."
@@ -2298,75 +2291,6 @@ msgstr "Error Descifrando el Diccionario"
 msgid "Cute."
 msgstr "Muy bonito."
 
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:33
-msgid "Your personal dictionary was erased."
-msgstr "Se eliminó su diccionario personal."
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:34
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:47
-msgid "Dictionary Erased"
-msgstr "Diccionario Borrado"
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:41
-msgid ""
-"Your personal dictionary was erased. Please close this window and click "
-"\"Check Spelling\" button again to start your spellcheck over."
-msgstr ""
-"Su diccionario personal ha sido borrado. Por favor cierre estaventana y "
-"pulse el botón de comprobar la ortografía de nuevo."
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:45
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:77
-msgid "Close this Window"
-msgstr "Cerrar esta Ventana"
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:70
-msgid ""
-"Your personal dictionary was re-encrypted successfully. Now return to the "
-"&quot;SpellChecker options&quot; menu and make your selection again."
-msgstr ""
-"Su diccionario personal ha sido cifrado correctamente. Vuelva a la página de "
-"opciones de SpellChecker y vuelva a realizar su selección."
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:72
-msgid "Successful Re-encryption"
-msgstr "Cifrado Correcto"
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:75
-msgid ""
-"Your personal dictionary was re-encrypted successfully. Please close this "
-"window and click \"Check Spelling\" button again to start your spellcheck "
-"over."
-msgstr ""
-"Su diccionario personal ha sido cifrado correctamente. Por favor cierre esta "
-"venta y pulse sobre el botón \"Otrografía\" de nuevo para volver a empezar "
-"la comprobación"
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:79
-msgid "Dictionary re-encrypted"
-msgstr "Diccionario Cifrado"
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto.mod:39
-msgid ""
-"Your personal dictionary has been <strong>encrypted</strong> and is now "
-"stored in an <strong>encrypted format</strong>."
-msgstr ""
-"Su diccionario personal ha sido <b>cifrado</b> y ha sido almacenado en un "
-"formato <b>cifrado</b>."
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto.mod:54
-msgid ""
-"Your personal dictionary has been <strong>decrypted</strong> and is now "
-"stored as <strong>clear text</strong>."
-msgstr ""
-"Su diccionario personal ha sido <b>descifrado</b> y se ha almacenado como "
-"<b>texto</b> sin cifrar."
-
-#: squirrelmail/plugins/squirrelspell/modules/crypto.mod:65
-#: squirrelmail/plugins/squirrelspell/modules/enc_setup.mod:76
-msgid "Personal Dictionary Crypto Settings"
-msgstr "Opciones de Cifrado del Diccionario Personal"
-
 #: squirrelmail/plugins/squirrelspell/modules/check_me.mod:196
 msgid "SquirrelSpell Results"
 msgstr "Resultados de SquirrelSpell"
@@ -2472,6 +2396,75 @@ msgstr "La comprobaci
 msgid "No errors found"
 msgstr "No se encontraron errores"
 
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:33
+msgid "Your personal dictionary was erased."
+msgstr "Se eliminó su diccionario personal."
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:34
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:47
+msgid "Dictionary Erased"
+msgstr "Diccionario Borrado"
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:41
+msgid ""
+"Your personal dictionary was erased. Please close this window and click "
+"\"Check Spelling\" button again to start your spellcheck over."
+msgstr ""
+"Su diccionario personal ha sido borrado. Por favor cierre estaventana y "
+"pulse el botón de comprobar la ortografía de nuevo."
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:45
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:77
+msgid "Close this Window"
+msgstr "Cerrar esta Ventana"
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:70
+msgid ""
+"Your personal dictionary was re-encrypted successfully. Now return to the "
+"&quot;SpellChecker options&quot; menu and make your selection again."
+msgstr ""
+"Su diccionario personal ha sido cifrado correctamente. Vuelva a la página de "
+"opciones de SpellChecker y vuelva a realizar su selección."
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:72
+msgid "Successful Re-encryption"
+msgstr "Cifrado Correcto"
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:75
+msgid ""
+"Your personal dictionary was re-encrypted successfully. Please close this "
+"window and click \"Check Spelling\" button again to start your spellcheck "
+"over."
+msgstr ""
+"Su diccionario personal ha sido cifrado correctamente. Por favor cierre esta "
+"venta y pulse sobre el botón \"Otrografía\" de nuevo para volver a empezar "
+"la comprobación"
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto_badkey.mod:79
+msgid "Dictionary re-encrypted"
+msgstr "Diccionario Cifrado"
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto.mod:39
+msgid ""
+"Your personal dictionary has been <strong>encrypted</strong> and is now "
+"stored in an <strong>encrypted format</strong>."
+msgstr ""
+"Su diccionario personal ha sido <b>cifrado</b> y ha sido almacenado en un "
+"formato <b>cifrado</b>."
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto.mod:54
+msgid ""
+"Your personal dictionary has been <strong>decrypted</strong> and is now "
+"stored as <strong>clear text</strong>."
+msgstr ""
+"Su diccionario personal ha sido <b>descifrado</b> y se ha almacenado como "
+"<b>texto</b> sin cifrar."
+
+#: squirrelmail/plugins/squirrelspell/modules/crypto.mod:65
+#: squirrelmail/plugins/squirrelspell/modules/enc_setup.mod:76
+msgid "Personal Dictionary Crypto Settings"
+msgstr "Opciones de Cifrado del Diccionario Personal"
+
 #: squirrelmail/plugins/squirrelspell/modules/edit_dic.mod:28
 #: squirrelmail/plugins/squirrelspell/modules/forget_me.mod:77
 msgid "Personal Dictionary"
@@ -2484,8 +2477,7 @@ msgstr "Su diccionario personal no contiene ninguna palabra."
 
 #: squirrelmail/plugins/squirrelspell/modules/edit_dic.mod:36
 msgid "Please check any words you wish to delete from your dictionary."
-msgstr ""
-"Por favor marque todas las palabras que desea borrar de su diccionario."
+msgstr "Por favor marque todas las palabras que desea borrar de su diccionario."
 
 #: squirrelmail/plugins/squirrelspell/modules/edit_dic.mod:58
 #, c-format
@@ -2538,8 +2530,7 @@ msgstr ""
 "el cifrado del diccionario.</p>"
 
 #: squirrelmail/plugins/squirrelspell/modules/enc_setup.mod:52
-msgid ""
-"Please decrypt my personal dictionary and store it in a clear-text format."
+msgid "Please decrypt my personal dictionary and store it in a clear-text format."
 msgstr "Por favor descifra mi diccionario personal y guárdalo en modo texto."
 
 #: squirrelmail/plugins/squirrelspell/modules/enc_setup.mod:55
@@ -2575,8 +2566,7 @@ msgstr ""
 "clave nueva.</p>"
 
 #: squirrelmail/plugins/squirrelspell/modules/enc_setup.mod:70
-msgid ""
-"Please encrypt my personal dictionary and store it in an encrypted format."
+msgid "Please encrypt my personal dictionary and store it in an encrypted format."
 msgstr "Por favor cifra mi diccionario."
 
 #: squirrelmail/plugins/squirrelspell/modules/forget_me.mod:28
@@ -2692,15 +2682,13 @@ msgid "Your server options are as follows:"
 msgstr "Estas son sus opciones de servidor:"
 
 #: squirrelmail/plugins/translate/options.php:102
-msgid ""
-"13 language pairs, maximum of 1000 characters translated, powered by Systran"
+msgid "13 language pairs, maximum of 1000 characters translated, powered by Systran"
 msgstr ""
 "13 pares de idiomas, un máximo de 1000 caracteres traducidos, motor de "
 "Systran"
 
 #: squirrelmail/plugins/translate/options.php:105
-msgid ""
-"10 language pairs, maximum of 25 kilobytes translated, powered by Systran"
+msgid "10 language pairs, maximum of 25 kilobytes translated, powered by Systran"
 msgstr "10 pares de idiomas, máximo de 25 ks. traducidos, motor de Systran"
 
 #: squirrelmail/plugins/translate/options.php:108
@@ -2716,8 +2704,7 @@ msgstr ""
 "Translation Experts"
 
 #: squirrelmail/plugins/translate/options.php:114
-msgid ""
-"8 language pairs, no known limits, powered by GPLTrans (free, open source)"
+msgid "8 language pairs, no known limits, powered by GPLTrans (free, open source)"
 msgstr ""
 "8 pares de idiomas, no hay límites conocidos, motor GPLTrans (gratuito, open "
 "source)"
@@ -4059,84 +4046,88 @@ msgstr "
 msgid "Default Javascript Adrressbook"
 msgstr "¿Usar Javasrcipt por omisión en la agenda?"
 
-#: squirrelmail/plugins/administrator/defines.php:164
+#: squirrelmail/plugins/administrator/defines.php:163
+msgid "Auto delete folders"
+msgstr "Borrado automático de carpetas"
+
+#: squirrelmail/plugins/administrator/defines.php:166
 msgid "General Options"
 msgstr "Opciones Generales"
 
-#: squirrelmail/plugins/administrator/defines.php:166
+#: squirrelmail/plugins/administrator/defines.php:168
 msgid "Default Charset"
 msgstr "Juego de caracteres por omisión"
 
-#: squirrelmail/plugins/administrator/defines.php:177
+#: squirrelmail/plugins/administrator/defines.php:179
 msgid "Data Directory"
 msgstr "Directorio de datos"
 
-#: squirrelmail/plugins/administrator/defines.php:180
+#: squirrelmail/plugins/administrator/defines.php:182
 msgid "Temp Directory"
 msgstr "Directorio temporal"
 
-#: squirrelmail/plugins/administrator/defines.php:183
+#: squirrelmail/plugins/administrator/defines.php:185
 msgid "Hash Level"
 msgstr "Nivel de fragmentación"
 
-#: squirrelmail/plugins/administrator/defines.php:185
+#: squirrelmail/plugins/administrator/defines.php:187
 msgid "Hash Disabled"
 msgstr "¿Desactivar fragmentación de directorio?"
 
-#: squirrelmail/plugins/administrator/defines.php:187
+#: squirrelmail/plugins/administrator/defines.php:189
 msgid "Moderate"
 msgstr "Moderada"
 
-#: squirrelmail/plugins/administrator/defines.php:188
+#: squirrelmail/plugins/administrator/defines.php:190
 msgid "Medium"
 msgstr "Media"
 
-#: squirrelmail/plugins/administrator/defines.php:190
+#: squirrelmail/plugins/administrator/defines.php:192
 msgid "Default Left Size"
 msgstr "Tamaño por omisión de lista de carpetas"
 
-#: squirrelmail/plugins/administrator/defines.php:193
+#: squirrelmail/plugins/administrator/defines.php:195
 msgid "Usernames in Lowercase"
 msgstr "¿Nombres de usuarios en minúsculas?"
 
-#: squirrelmail/plugins/administrator/defines.php:195
+#: squirrelmail/plugins/administrator/defines.php:197
 msgid "Allow use of priority"
 msgstr "¿Activar prioridades?"
 
-#: squirrelmail/plugins/administrator/defines.php:197
+#: squirrelmail/plugins/administrator/defines.php:199
 msgid "Hide SM attributions"
 msgstr "¿Esconder atributos de SM?"
 
-#: squirrelmail/plugins/administrator/defines.php:200
 #: squirrelmail/plugins/administrator/defines.php:202
+#: squirrelmail/plugins/administrator/defines.php:204
 msgid "Message of the Day"
 msgstr "Mensaje del día"
 
-#: squirrelmail/plugins/administrator/defines.php:206
+#: squirrelmail/plugins/administrator/defines.php:208
 msgid "Database"
 msgstr "Base de datos"
 
-#: squirrelmail/plugins/administrator/defines.php:208
+#: squirrelmail/plugins/administrator/defines.php:210
 msgid "Address book DSN"
 msgstr "DSN de la libreta de direcciones"
 
-#: squirrelmail/plugins/administrator/defines.php:211
+#: squirrelmail/plugins/administrator/defines.php:213
 msgid "Address book table"
 msgstr "Tabla de la agenda"
 
-#: squirrelmail/plugins/administrator/defines.php:215
+#: squirrelmail/plugins/administrator/defines.php:217
 msgid "Preferences DSN"
 msgstr "DSN de preferencias"
 
-#: squirrelmail/plugins/administrator/defines.php:218
+#: squirrelmail/plugins/administrator/defines.php:220
 msgid "Preferences table"
 msgstr "Tabla de preferencias"
 
-#: squirrelmail/plugins/administrator/defines.php:223
+#: squirrelmail/plugins/administrator/defines.php:225
 msgid "Themes"
 msgstr "Temas"
 
-#: squirrelmail/plugins/administrator/defines.php:225
+#: squirrelmail/plugins/administrator/defines.php:227
 msgid "Style Sheet URL (css)"
 msgstr "URL de la hoja de estilos (css)"
 
@@ -4172,36 +4163,11 @@ msgstr ""
 "Este módulo permite configurar remotamente las opciones principales de "
 "Squirrelmail."
 
-#: squirrelmail/plugins/spamcop/setup.php:72
-#: squirrelmail/plugins/spamcop/setup.php:79
-msgid "Report as Spam"
-msgstr "Reportar como SPAM"
-
-#: squirrelmail/plugins/spamcop/setup.php:90
-msgid "SpamCop - Spam Reporting"
-msgstr "Reporte de SPAM - SpamCop"
-
-#: squirrelmail/plugins/spamcop/setup.php:92
-msgid ""
-"Help fight the battle against unsolicited email.  SpamCop reads the spam "
-"email and determines the correct addresses to send complaints to.  Quite "
-"fast, really smart, and easy to use."
-msgstr ""
-
-#~ msgid "Close window"
-#~ msgstr "Cerrar Ventana"
-
-#~ msgid "SECURITY BREACH ON DECK 5! CMDR TUVOK AND SECURITY TEAM REQUESTED."
-#~ msgstr ""
-#~ "Se ha producido un intento de intrusión no autorizado. Administrador del "
-#~ "sistema contactado."
+#: squirrelmail/po/independent_strings.txt:18
+msgid "Delivery error report"
+msgstr "Informe de error en entrega"
 
-#~ msgid "Mailinglist options:"
-#~ msgstr "Opciones de Lista:"
+#: squirrelmail/po/independent_strings.txt:19
+msgid "Undelivered Message Headers"
+msgstr "Cabecera de mensaje no entregado"
 
-#~ msgid ""
-#~ "FREE - ORBL is another ORBS spinoff formed after ORBS shut down. May be "
-#~ "SLOOOOOOW!"
-#~ msgstr ""
-#~ "GRATUITO - ORBL es otra variante de ORBS creada después de su cierre. "
-#~ "Puede ser muy lento."
index a277a2071342f33f52a97c873284eead5aedceef..42670eae7593dd09c1df445f092356a5e17ca76c 100644 (file)
@@ -219,16 +219,19 @@ function SendMDN ( $recipient , $sender) {
 
 function ToggleMDNflag ( $set ) {
 
-    global $imapConnection, $passed_id;
+    global $imapConnection, $passed_id, $mailbox;
+
+    if ( $set ) {
+        $sg = '+';
 
-    $myflag = '$MDNSent';
-    if ($set) {
-        $read = sqimap_run_command ($imapConnection, "STORE $passed_id +FLAGS ($myflag)", true,
-                $response, $readmessage);
     } else {
-        $read = sqimap_run_command ($imapConnection, "STORE $passed_id -FLAGS ($myflag)", true,
-                $response, $readmessage);
+        $sg = '-';
     }
+
+    $cmd = 'STORE ' . $passed_id . ' ' . $cmd . 'FLAGS ($MDNSent)';
+    sqimap_mailbox_select($imapConnection, $mailbox);
+    $read = sqimap_run_command ($imapConnection, $cmd, true, $response, $readmessage);
+
 }
 
 function ClearAttachments() {
@@ -269,17 +272,8 @@ if( $default_use_mdn &&
     ( $mdn_user_support = getPref($data_dir, $username, 'mdn_user_support', $default_use_mdn) ) ) {
 
     $supportMDN = ServerMDNSupport($read);
-
     $flags = sqimap_get_flags ($imapConnection, $passed_id);
-    $FirstTimeSee = TRUE;
-    $num=0;
-    while ($num < count($flags)) {
-        if ($flags[$num] == 'Seen') {
-            $FirstTimeSee = false;
-        }
-        $num++;
-    }
-
+    $FirstTimeSee = !(in_array( 'Seen', $flags ));
 }
 
 displayPageHeader($color, $mailbox);
@@ -786,8 +780,7 @@ if ($default_use_mdn) {
     if ($mdn_user_support) {
 
         // debug gives you the capability to remove mdn-flags
-        $debug = FALSE;
-
+        $debug = false;
         $read = sqimap_run_command ($imapConnection, "FETCH $passed_id BODY.PEEK[HEADER.FIELDS (Disposition-Notification-To)]", true,
                                 $response, $readmessage);
         $MDN_to = substr($read[1], strpos($read[1], ' '));
@@ -795,15 +788,14 @@ if ($default_use_mdn) {
 
         $read = sqimap_run_command ($imapConnection, "FETCH $passed_id FLAGS", true,
                                 $response, $readmessage);
-        $str = strtolower($read[0]);
-        if (ereg('mdnsent', $str ) ) {
-            $MDN_flag_present = true;
-        }
+
+        $MDN_flag_present = preg_match( '/.*\$MDNSent/i', $read[0]);
+
         if (trim($MDN_to) &&
             (!isset( $sendreceipt ) || $sendreceipt == '' )  ) {
 
             if ( $MDN_flag_present && $supportMDN) {
-                $sendreceipt="removeMDN";
+                $sendreceipt = 'removeMDN';
                 $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
                 $sendreceipt="";
                 if ($debug ) {
@@ -877,20 +869,22 @@ if ($default_use_mdn) {
             }
         }
 
-        if ( !isset( $sendreceipt ) ) {
+        if ( !isset( $sendreceipt ) || $sendreceipt == '' ) {
         } else if ( $sendreceipt == 'send' ) {
             if ( !$MDN_flag_present) {
                 if (isset($identity) ) {
-                    $final_recipient = getPref($data_dir, $username, 'email_address' . '0');
-                } else $final_recipient = getPref($data_dir, $username, 'email_address');
+                    $final_recipient = getPref($data_dir, $username, 'email_address' . '0', '' );
+                } else {
+                    $final_recipient = getPref($data_dir, $username, 'email_address', '' );
+                }
 
                 $final_recipient = trim($final_recipient);
                 if ($final_recipient == '' ) {
-                    $final_recipient = getPref($data_dir, $username, 'email_address');
+                    $final_recipient = getPref($data_dir, $username, 'email_address', '' );
                 }
 
-                if ( SendMDN( $MDN_to, $final_recipient ) > 0 && $supportMDN == true ) {
-                    ToggleMDNflag ( true);
+                if ( SendMDN( $MDN_to, $final_recipient ) > 0 && $supportMDN ) {
+                    ToggleMDNflag( true);
                 }
             }
             $sendreceipt = 'removeMDN';