Basic mailto: support.
[squirrelmail.git] / src / redirect.php
index 89529f11559359c49168328ac30e9eb5d4dc412d..5658995da244fcd51c05518da4e05da29b1e9b3a 100644 (file)
@@ -49,6 +49,9 @@ sqGetGlobalVar('js_autodetect_results', $js_autodetect_results);
 if(!sqGetGlobalVar('squirrelmail_language', $squirrelmail_language) || $squirrelmail_language == '') {
        $squirrelmail_language = $squirrelmail_default_language;
 }
 if(!sqGetGlobalVar('squirrelmail_language', $squirrelmail_language) || $squirrelmail_language == '') {
        $squirrelmail_language = $squirrelmail_default_language;
 }
+if (!sqgetGlobalVar('mailto', $mailto)) {
+    $mailto = '';
+}
 
 /* end of get globals */
 
 
 /* end of get globals */
 
@@ -147,6 +150,10 @@ if ( sqgetGlobalVar('session_expired_location', $session_expired_location, SQ_SE
     }
     unset($session_expired_location);
 }
     }
     unset($session_expired_location);
 }
+if($mailto != '') {
+    $redirect_url  = 'webmail.php?right_frame=compose.php&mailto=';
+    $redirect_url .= $mailto;
+}
 
 /* Write session data and send them off to the appropriate page. */
 session_write_close();
 
 /* Write session data and send them off to the appropriate page. */
 session_write_close();