Browse Source

clicking on email addr sends you to compose screen

Luke Ehresman 25 years ago
parent
commit
a1b228fb5e
2 changed files with 5 additions and 3 deletions
  1. 1 1
      functions/url_parser.php
  2. 4 2
      src/compose.php

+ 1 - 1
functions/url_parser.php

@@ -11,7 +11,7 @@
    }
 
    function parseEmail ($body) {
-      $body = eregi_replace ("([a-z]|[0-9]|_|\.)+\@([a-z]|[0-9]|_)+(.([a-z]|[0-9]|_)+)*", "<a href=\"mailto:\\0\">\\0</a>", $body);
+      $body = eregi_replace ("([a-z]|[0-9]|_|\.|-)+\@([a-z]|[0-9]|_)+(\.([a-z]|[0-9]|_)+)*", "<a href=\"../src/compose.php?send_to=\\0\">\\0</a>", $body);
       return $body;
    }
 

+ 4 - 2
src/compose.php

@@ -106,8 +106,10 @@
          }
       }
       
-      $send_to = sqimap_find_email($send_to);
-      
+      if (!$send_to) {
+         $send_to = sqimap_find_email($send_to);
+      }
+
       $send_to = ereg_replace("\"", "", $send_to);
       $send_to = stripslashes($send_to);