Index: program/js/app.js
===================================================================
--- program/js/app.js	(revision 01bb03134b5fd3797cbcf992104a3b6179b7f152)
+++ program/js/app.js	(revision fd660ac0e2af4fc3c2633cfd19bd31fd7a905951)
@@ -7,5 +7,5 @@
  | Licensed under the GNU GPL                                            |
  |                                                                       |
- | Modified: 2005/10/26 (roundcube)                                      |
+ | Modified: 2005/11/01 (roundcube)                                      |
  |                                                                       |
  +-----------------------------------------------------------------------+
@@ -1204,6 +1204,6 @@
           {
           this.message_rows[uid].classname += ' unread';
-          if (!this.in_selection(uid))
-            this.message_rows[uid].obj.className += ' unread';
+          this.set_classname(this.message_rows[uid].obj, 'unread', true);
+
           if (this.env.unreadicon)
             icn_src = this.env.unreadicon;
@@ -1212,6 +1212,5 @@
           {
           this.message_rows[uid].classname = this.message_rows[uid].classname.replace(/\s*unread/, '');
-          if (!this.in_selection(uid))
-            this.message_rows[uid].obj.className = this.message_rows[uid].obj.className.replace(/\s*unread/, '');
+          this.set_classname(this.message_rows[uid].obj, 'unread', false);
 
           if (this.message_rows[uid].replied && this.env.repliedicon)
Index: program/steps/mail/sendmail.inc
===================================================================
--- program/steps/mail/sendmail.inc	(revision d7cb77414c4cf074269b6812c3dd3571ee29afca)
+++ program/steps/mail/sendmail.inc	(revision fd660ac0e2af4fc3c2633cfd19bd31fd7a905951)
@@ -195,5 +195,9 @@
 
   $header_str = $MAIL_MIME->txtHeaders($headers_php);
-  $sent = mail($mailto, $msg_subject, $msg_body, $header_str, "-f$from");
+  
+  if(ini_get('safe_mode'))
+    $sent = mail($mailto, $msg_subject, $msg_body, $header_str);
+  else  
+    $sent = mail($mailto, $msg_subject, $msg_body, $header_str, "-f$from");
   }
 
