Verify email in Java

后端 未结 9 1463
长发绾君心
长发绾君心 2020-12-02 11:27

Is there any way to verify in Java code that an e-mail address is valid. By valid, I don\'t just mean that it\'s in the correct format (someone@domain.subdomain), but that\'

9条回答
  •  醉梦人生
    2020-12-02 12:04

    Do a DNS lookup on the hostname to see if that exists. You could theoretically also initiate a connection to the mailserver and see if it tells you whether the recipient exists, but I think many servers pretend they know an address, then reject the email anyway.

提交回复
热议问题