How to find out if an email address exists through PHP?

Some people subscribed to my blog with their email address.

But some email addresses do not exist.

How can I find out if these email addresses are valid when I send an email to these email addresses?

+3
source share
4 answers

Send them a confirmation email with a link and activate your subscription only if they click on this link.

+8
source

, . , , , , .

, , , (, casablanca ).

+2

100% , .

- SMTP VRFY, . . SMTP.

, , .

( PHP, ):

HELO <your server name>
MAIL FROM: <>
RCPT TO: <destination@to.check>
QUIT
+2

MX :

$result = getmxrr($hostname, $mxHosts);
if(count($mxHosts) < 1){
   //no MX records found
}

"jdjshjk@fdhjk.dff". . php.net: http://www.php.net/manual/en/function.getmxrr.php

+1

Source: https://habr.com/ru/post/1776098/


All Articles