- conf.pl changes for delete_folder restrictions with Courier-IMAP and
UW-IMAP (#715550).
- Fixed code to allow for \ in password/username (#718116).
+ - Added mailto: support for Windows clients. See
+ contrib/squirrelmail.mailto.reg
**************************************
--- /dev/null
+Here is a windows registry file to set SquirrelMail as a windows email program
+Once this entry is installed, go to Internet Options and select the Programs
+tab. SquirrelMail should be an option under E-mail:
+
+---- Cut here ----
+Windows Registry Editor Version 5.00
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail]
+@="SquirrelMail"
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\Protocols]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\Protocols\mailto]
+"URL Protocol"=""
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\Protocols\mailto\shell]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\Protocols\mailto\shell\open]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\Protocols\mailto\shell\open\command]
+@="rundll32.exe url.dll,FileProtocolHandler http://mail.server/squirrelmail/src/mailto.php?emailaddress=\"%1\""
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\shell]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\shell\open]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\shell\open\command]
+
}
}
+if(sqgetGlobalVar('mailto', $mailto)) {
+ $rcptaddress = '<input type="hidden" name="mailto" value="' . urlencode($mailto) . '" />' . "\n";
+} else {
+ $rcptaddress = '';
+}
echo html_tag( 'table',
html_tag( 'tr',
html_tag( 'td',
html_tag( 'td',
'<input type="password" name="' . $password_form_name . '" />' . "\n" .
'<input type="hidden" name="js_autodetect_results" value="SMPREF_JS_OFF" />' . "\n" .
+ $rcptaddress .
'<input type="hidden" name="just_logged_in" value="1" />' . "\n",
'left', '', 'width="*"' )
) ,
--- /dev/null
+<?php
+
+/**
+ * mailto.php -- mailto: url handler
+ *
+ * Copyright (c) 1999-2003 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
+ * login first)
+ *
+ * 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
+ */
+
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'functions/global.php');
+
+header('Pragma: no-cache');
+if(!sqgetGlobalVar('emailaddress', $emailaddress)) {
+ return;
+}
+
+if(stristr($emailaddress, 'mailto:')) {
+ $emailaddress = substr($emailaddress, 7);
+}
+if(($pos = strpos($emailaddress, '?')) !== false) {
+ $a = substr($emailaddress, $pos+1);
+ list($emailaddress, $a) = explode('?', $emailaddress, 2);
+ $a = explode('=', $a, 2);
+ $_GET['emailaddress'] = $emailaddress;
+ $_GET[$a[0]] = $a[1];
+}
+
+$trtable = array('emailaddress' => 'send_to',
+ 'cc' => 'send_to_cc',
+ 'bcc' => 'send_to_bcc',
+ 'body' => 'body',
+ 'subject' => 'subject');
+$url = '';
+/* CC, BCC, etc could be any case, so we'll fix them here */
+foreach($_GET as $k=>$g) {
+ if($g != '') {
+ $k = strtolower($k);
+ $k = $trtable[$k];
+ $url .= $k . '=' . urlencode($g) . '&';
+ }
+}
+$url = substr($url, 0, -1);
+
+sqsession_is_active();
+/* Check to see if we're logged in */
+/*
+if (sqsession_is_registered('user_is_logged_in')) {
+ $redirect = 'webmail.php?right_frame=compose.php?';
+} else {
+ $redirect = 'login.php?mailto=';
+}
+*/
+$url = urlencode($url);
+/* $redirect .= $url; */
+$redirect = 'login.php?mailto=' . $url;
+session_write_close();
+header('Location: ' . $redirect);
+?>
if(!sqGetGlobalVar('squirrelmail_language', $squirrelmail_language) || $squirrelmail_language == '') {
$squirrelmail_language = $squirrelmail_default_language;
}
+if (!sqgetGlobalVar('mailto', $mailto)) {
+ $mailto = '';
+}
/* end of get globals */
}
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();
if ( isset($_SESSION['session_expired_post']) ) {
sqsession_unregister('session_expired_post');
}
+if(!sqgetGlobalVar('mailto', $mailto)) {
+ $mailto = '';
+}
is_logged_in();
$right_frame_url = 'options.php';
} elseif ($right_frame == 'folders.php') {
$right_frame_url = 'folders.php';
+} elseif ($right_frame == 'compose.php') {
+ $right_frame_url = 'compose.php?' . $mailto;
} else if ($right_frame == '') {
$right_frame_url = 'right_main.php';
} else {