Source for file mailto.php
Documentation is available at mailto.php
* mailto.php -- mailto: url handler
* 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 © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: mailto.php,v 1.11.2.4 2006/06/02 15:51:50 tokul Exp $
* Path for SquirrelMail required files.
/* SquirrelMail required files. */
require_once(SM_PATH .
'functions/global.php');
require_once(SM_PATH .
'functions/strings.php');
require_once(SM_PATH .
'config/config.php');
/* Force users to login each time? */
/* Open only the compose window, meaningless if $force_login is true */
$trtable =
array('cc' =>
'send_to_cc',
$emailaddress =
trim($emailaddress);
if(stristr($emailaddress, 'mailto:')) {
$emailaddress =
substr($emailaddress, 7);
if(strpos($emailaddress, '?') !==
false) {
list
($emailaddress, $a) =
explode('?', $emailaddress, 2);
$url =
'send_to=' .
urlencode($emailaddress) .
'&' .
$url;
/* CC, BCC, etc could be any case, so we'll fix them here */
foreach($_GET as $k=>
$g) {
if(isset
($trtable[$k])) {
if($compose_only ==
true) {
$redirect =
'compose.php?' .
$url;
$redirect =
'webmail.php?right_frame=compose.php?' .
urlencode($url);
$redirect =
'login.php?mailto=' .
urlencode($url);
Documentation generated on Sat, 07 Oct 2006 16:32:18 +0300 by phpDocumentor 1.3.0RC6