简体   繁体   中英

How to check the email is fake address in codeigniter ? (I used PHPMailer)

Can we check if the email is sent to the fake address in CodeIgniter? I used PHPMailer, it always returns true. Or there is another config in PHPMailer that I don't know.

PHPMailer automatically applies strict validation to all email addresses you provide, before it uses them.

There are a few checks you can do outside of that, for example check that the domain exists at all. PHPMailer only returns a success value if it successfully submits a message - but if you're using the default mail() mailer, it will always succeed because PHPMailer is not involved with the final delivery of the message, only the submission of it.

You should never attempt to validate whether a message exists by connecting to a mail server, issuing an RCPT TO for the address and then dropping the connection. ISPs are wise to this and they will use your activites to block legitimate deliveries from you in future.

So, assuming the address is technically valid and the domain exists, the only way to check whether an email address is fake or not is to send it a message.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM