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 907a5284117be2fc1750731db0dd0653ee3797af..50ad2b4b16ce64b1f795d26e3784ce1a27765712 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]
 [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]
 
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\SquirrelMail\shell]
 
index 9f0603cf8f405a07f62ab7861d58a4be89e0886c..bd19c53445071ac3312fa1ec3823ffaf81253a5a 100644 (file)
@@ -28,8 +28,10 @@ if(!sqgetGlobalVar('emailaddress', $emailaddress)) {
     return;
 }
 
     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);
 }
 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];
 }
     $_GET['emailaddress'] = $emailaddress;
     $_GET[$a[0]] = $a[1];
 }
-
 $trtable = array('emailaddress' => 'send_to',
                  'cc'           => 'send_to_cc',
                  'bcc'          => 'send_to_bcc',
 $trtable = array('emailaddress' => 'send_to',
                  'cc'           => 'send_to_cc',
                  'bcc'          => 'send_to_bcc',