How to check if an email address exists without sending an email?

前端 未结 14 1753
半阙折子戏
半阙折子戏 2020-11-22 00:28

I have come across this PHP code to check email address using SMTP without sending an email.

Has anyone tried anything similar or does it work for you? Can you tell

14条回答
  •  不思量自难忘°
    2020-11-22 01:27

    This will fail (amongst other cases) when the target mailserver uses greylisting.

    Greylisting: SMTP server refuses delivery the first time a previously unknown client connects, allows next time(s); this keeps some percentage of spambots out, while allowing legitimate use - as it is expected that a legitimate mail sender will retry, which is what normal mail transfer agents will do.

    However, if your code only checks on the server once, a server with greylisting will deny delivery (as your client is connecting for the first time); unless you check again in a little while, you may be incorrectly rejecting valid e-mail addresses.

提交回复
热议问题