modified Common.php to support custom email:// urls