Add ability to return error string as well. Would be nice if we had an error code...
[squirrelmail.git] / src / mailto.php
index fc1bf393178d88f15501a89574cfc339fc6495ef..0ad9224fc78221582a25fff4f16f6307e63201ab 100644 (file)
@@ -3,9 +3,6 @@
 /**
  * mailto.php -- mailto: url handler
  *
- * Copyright (c) 1999-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
  * This checks to see if we're logged in.  If we are we open up a new
  * compose window for this email, otherwise we go to login.php
  * (the above functionality has been disabled, by default you are required to
  * Use the following url to use mailto:
  * http://<your server>/<squirrelmail base dir>/src/mailto.php?emailaddress=%1
  * see ../contrib/squirrelmail.mailto.reg for a Windows Registry file
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  */
 
+// reduce the included files in int.php
+$bLogin = true;
+
 /**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
  */
-define('SM_PATH','../');
-
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'config/config.php');
-require_once(SM_PATH . 'functions/global.php');
-require_once(SM_PATH . 'functions/strings.php');
+require('../include/init.php');
 
 /* Force users to login each time? */
 $force_login  = true;
@@ -66,7 +62,6 @@ if(sqgetGlobalVar('emailaddress', $emailaddress)) {
     }
     $url = substr($url, 0, -1);
 }
-sqsession_is_active();
 
 if($force_login == false && sqsession_is_registered('user_is_logged_in')) {
     if($compose_only == true) {