ereg => preg
[squirrelmail.git] / src / read_body.php
index 66d968da6fcb526e10fbccd825e5abb0f012038b..a8eb3056dbd9c4af770d8f7fd0bcef07a9d8a16b 100644 (file)
@@ -150,9 +150,12 @@ function ServerMDNSupport( $read ) {
     $num = 0;
     $ret = FALSE;
     while ( !$ret && $num < count($read) ) {
+        $ret = preg_match( '/.*PERMANENTFLAGS.*(MDNSent|\\\*).*/i', $read[$num] );
+        /*
         if ( ereg('PERMANENTFLAGS', $read[$num] ) ) {
             $ret = ( ereg('mdnsent',strtolower($read[$num]) ) || ereg("\\\*", $read[$num] ) );
         }
+        */
         $num++;
     }
     return ( $ret );
@@ -162,9 +165,7 @@ function SendMDN ( $recipient , $sender) {
     global $imapConnection, $mailbox, $username, $attachment_dir, $SERVER_NAME,
            $version, $attachments, $identity, $data_dir, $passed_id;
 
-    $message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
-    $header = $message->header;
-
+    $header = sqimap_get_message_header($imapConnection, $passed_id, $mailbox);
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
 
     // part 1 (RFC2298)
@@ -221,7 +222,7 @@ function SendMDN ( $recipient , $sender) {
     $MDN_to = trim($recipient);
     $reply_id = 0;
 
-    return (SendMessage($MDN_to,'','',"Read: $subject", $body,$reply_id, True, 3) );
+    return (SendMessage($MDN_to,'','', _("Read:") . ' ' . $subject, $body,$reply_id, True, 3) );
 }