本文介绍了电子邮件ID验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,

我有一个文本框来获取电子邮件ID.
使用正常的Javascript验证,我可以检查输入的天气字符串是否为电子邮件ID.
但是是否有任何方法可以找到输入的天气电子邮件ID有效.
例如. [email protected]
在正常验证中,它接受它作为电子邮件ID.
实际上,没有这样的域和电子邮件.
如果有这样的建议,是否可以找到它.

Dear Friends,

I ve a text box to get E-Mail ID.
Using normal Javascript validation I can check weather entered string is email id or not.
But is there any option to find weather entered email id is valid one.
Eg. [email protected]
In normal validation, It accept it as Email ID.
In real, there is no domain and email like this.
Is there any option to find it, if so kindly suggest.

推荐答案



public static bool IsConnectedToInternet
{
    get
    {
        //  Split email id and get domain name.
        Uri url = new Uri("www.testing.com"); // as per your example
        string pingurl = string.Format("{0}", url.Host);
        string host = pingurl;
        bool result = false;
        Ping p = new Ping();
        try
        {
            PingReply reply = p.Send(host, 3000);
            if (reply.Status == IPStatus.Success)
                return true;
        }
        catch { }
        return result;
    }
}



PING向服务器发送ICMP(Internet控制消息协议)回显请求,并等待接收回显.如果状态"的值为成功,则PingReply成功.



The PING sends an ICMP (Internet Control Message Protocol) echo request to the server and waits to receive the echo back. If the value of Status is success, the PingReply is successful.


这篇关于电子邮件ID验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 18:14