From 609999ad93c75bb4c7b38cae318934bce9637fbe Mon Sep 17 00:00:00 2001 From: indiri69 Date: Wed, 23 Apr 2003 15:43:29 +0000 Subject: [PATCH] Small mailto changes git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4795 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- contrib/squirrelmail.mailto.reg | 2 +- src/mailto.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/squirrelmail.mailto.reg b/contrib/squirrelmail.mailto.reg index 907a5284..50ad2b4b 100644 --- a/contrib/squirrelmail.mailto.reg +++ b/contrib/squirrelmail.mailto.reg @@ -18,7 +18,7 @@ Windows Registry Editor Version 5.00 [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\"" +@="rundll32.exe url.dll,FileProtocolHandler http://mail.server/squirrelmail/src/mailto.php?emailaddress=%1" [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\shell] diff --git a/src/mailto.php b/src/mailto.php index 9f0603cf..bd19c534 100644 --- a/src/mailto.php +++ b/src/mailto.php @@ -28,8 +28,10 @@ if(!sqgetGlobalVar('emailaddress', $emailaddress)) { return; } -if(stristr($emailaddress, 'mailto:')) { - $emailaddress = substr($emailaddress, 7); +$mailto_pos = strpos(strtolower($emailaddress), 'mailto:'); +if($mailto_pos !== false) { + $emailaddress = substr($emailaddress, $mailto_pos+7); + $_GET['emailaddress'] = $emailaddress; } if(($pos = strpos($emailaddress, '?')) !== false) { $a = substr($emailaddress, $pos+1); @@ -38,7 +40,6 @@ if(($pos = strpos($emailaddress, '?')) !== false) { $_GET['emailaddress'] = $emailaddress; $_GET[$a[0]] = $a[1]; } - $trtable = array('emailaddress' => 'send_to', 'cc' => 'send_to_cc', 'bcc' => 'send_to_bcc', -- 2.25.1