Verify that email domain exists

前端 未结 5 1247
误落风尘
误落风尘 2021-01-02 05:14

Does anyone check the domain of an email address as part of their verification steps? eg. Confirm that gmail.com exists if the user specified blah@gmail.com as their address

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 05:51

    You could do a dns lookup on the mx record. Here's an example at Code Project:
    http://www.codeproject.com/KB/IP/dnslookupdotnet.aspx

    [addendum]:

    That should answer your question as asked, but as a side note I agree with @Franci that the old standby of sending a verification message is better. If someone's done everything else right to fool your validation, you're really not buying much in also checking the domain.

提交回复
热议问题