«

根据用户输入的Email跳转到相应的电子邮箱首页

时间:2024-1-24 09:16     作者:韩俊     分类: Html+Css


用户注册完毕需要跳转到自己注册时所填写的邮箱去收取验证邮件,那么如何根据用户输入的Email来判断用户输入那类电子邮件,从而直接跳转到改电子邮件服务商的主页上方便直接登陆呢?下面这个函数基本列出了国内大部分电子邮件服务商,应该可以满足这个需求了吧!

//功能:根据用户输入的Email跳转到相应的电子邮箱首页
function gotomail($mail){
    $t=explode('@',$mail);
    $t=strtolower($t[1]);
    if($t=='163.com'){
        return 'mail.163.com';
    }else if($t=='vip.163.com'){
        return 'vip.163.com';
    }else if($t=='126.com'){
        return 'mail.126.com';
    }else if($t=='qq.com'||$t=='vip.qq.com'||$t=='foxmail.com'){
        return 'mail.qq.com';
    }else if($t=='gmail.com'){
        return 'mail.google.com';
    }else if($t=='sohu.com'){
        return 'mail.sohu.com';
    }else if($t=='tom.com'){
        return 'mail.tom.com';
    }else if($t=='vip.sina.com'){
        return 'vip.sina.com';
    }else if($t=='sina.com.cn'||$t=='sina.com'){
        return 'mail.sina.com.cn';
    }else if($t=='tom.com'){
        return 'mail.tom.com';
    }else if($t=='yahoo.com.cn'||$t=='yahoo.cn'){
        return 'mail.cn.yahoo.com';
    }else if($t=='tom.com'){
        return 'mail.tom.com';
    }else if($t=='yeah.net'){
        return 'www.yeah.net';
    }else if($t=='21cn.com'){
        return 'mail.21cn.com';
    }else if($t=='hotmail.com'){
        return 'www.hotmail.com';
    }else if($t=='sogou.com'){
        return 'mail.sogou.com';
    }else if($t=='188.com'){
        return 'www.188.com';
    }else if($t=='139.com'){
        return 'mail.10086.cn';
    }else if($t=='189.cn'){
        return 'webmail15.189.cn/webmail';
    }else if($t=='wo.com.cn'){
        return 'mail.wo.com.cn/smsmail';
    }else if($t=='139.com'){
        return 'mail.10086.cn';
    }else {
        return '';
    }
}

标签: javascript html css

热门推荐