Small mailto changes
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 23 Apr 2003 15:43:29 +0000 (15:43 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 23 Apr 2003 15:43:29 +0000 (15:43 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4795 7612ce4b-ef26-0410-bec9-ea0150e637f0

contrib/squirrelmail.mailto.reg
src/mailto.php

index 907a528..50ad2b4 100644 (file)
@@ -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]
 
index 9f0603c..bd19c53 100644 (file)
@@ -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',