Add cc: to the list of checks for empty recipients
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 1 Jul 2007 07:26:57 +0000 (07:26 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 1 Jul 2007 07:26:57 +0000 (07:26 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12498 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index 9f99f9855554d5adf0045bb29d70255a44905ca9..a1f2b18f196281c9744dd3bd5e094ec39397e1d7 100644 (file)
@@ -1366,9 +1366,12 @@ function checkInput ($show) {
      * using $show=false, and then when i'm ready to display the error
      * message, show=true
      */
-    global $send_to, $send_to_bcc;
+    global $send_to, $send_to_cc, $send_to_bcc;
 
-    if ($send_to == '' && $send_to_bcc == '') {
+    $send_to = trim($send_to);
+    $send_to_cc = trim($send_to_cc);
+    $send_to_bcc = trim($send_to_bcc);
+    if (empty($send_to) && empty($send_to_cc) && empty($send_to_bcc)) {
         if ($show) {
             plain_error_message(_("You have not filled in the \"To:\" field."));
         }