* Great little patch to open up the compose screen initially
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 14 May 2001 22:20:11 +0000 (22:20 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 14 May 2001 22:20:11 +0000 (22:20 +0000)
* Thanks to Marc Lucks
* Added docs to Wiki -- http://www.squirrelmail.org/wiki/WindowsMailto

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1361 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/login.php
src/redirect.php
src/webmail.php

index 82ba320..04ee698 100644 (file)
    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 (isset($emailaddress)) {
+      if (stristr($emailaddress,"mailto:"))
+         $rcptaddress = substr ($emailaddress, 7,strlen($emailaddress)-7);
+      else
+         $rcptaddress = $emailaddress;
+      echo "               <INPUT TYPE=HIDDEN NAME=\"rcptemail\" VALUE=\"".htmlspecialchars($rcptaddress)."\">\n";
+   }
    echo "         </TABLE>\n";
    echo "      </TD>\n";
    echo "   </TR><TR>\n";
index 959ecd3..e3ebf80 100644 (file)
@@ -84,5 +84,8 @@
    $user_is_logged_in = true;
    session_register ('user_is_logged_in');
 
-   header("Location: webmail.php");
+   if(isset($rcptemail))
+      header("Location: webmail.php?right_frame=compose.php&rcptaddress=$rcptemail");
+   else
+      header("Location: webmail.php");
 ?>
index 45242c7..4064f9c 100644 (file)
@@ -79,6 +79,8 @@
       $right_frame_url = 'options.php';
    } else if ($right_frame == 'folders.php') {
       $right_frame_url = 'folders.php';
+   } else if ($right_frame == 'compose.php') {
+      $right_frame_url = "compose.php?send_to=$rcptaddress";
    } else {
       if (!isset($just_logged_in)) $just_logged_in = 0;
       $right_frame_url = "right_main.php?just_logged_in=$just_logged_in";