* Fixed the MOTD
[squirrelmail.git] / src / login.php
index 82ba320b98aa677803077ac67cff1f2c2c9d5cb5..4b7218e97bca7c53247490f6adcc584010f4fcfe 100644 (file)
     **  $Id$
     **/
 
+   $rcptaddress = '';
+   if (isset($emailaddress)) {
+      if (stristr($emailaddress, 'mailto:'))
+         $rcptaddress = substr($emailaddress, 7);
+      else
+         $rcptaddress = $emailaddress;
+   }
+
    include("../functions/strings.php");
    include("../config/config.php");
    include('../functions/i18n.php');
@@ -26,7 +34,6 @@
 
    setcookie("username", '', 0, $base_uri);
    setcookie("key", '', 0, $base_uri);
-   setcookie("logged_in", 0, 0, $base_uri);
    header ("Pragma: no-cache");
 
    // In case the last session was not terminated properly, make sure
    echo _("Password:");
    echo "               </TD><TD WIDTH=* ALIGN=left>\n";
    echo "                  <INPUT TYPE=PASSWORD NAME=\"$password_form_name\">\n";
-   echo "               </TD>\n"; 
+   echo "               </TD>\n";
+   if ($rcptaddress != '') {
+      echo "               <INPUT TYPE=HIDDEN NAME=\"rcptemail\" VALUE=\"".htmlspecialchars($rcptaddress)."\">\n";
+   }
    echo "         </TABLE>\n";
    echo "      </TD>\n";
    echo "   </TR><TR>\n";