Hello,
Thank you for the feedback.
This class can simulate a delivery to a specific mailbox. This allows checking if the email server of the email address that you want to validate would accept a message for that email address.
There are two details:
1. This class needs to attempt to connect to port 25 of the email server that will receive messages to simulate message delivery. If your hosting company blocks port 25, this method checks if the email address cannot be used. In this case, I suggest changing to another hosting company if you want to use this method.
2. The validation methods that this class can perform are more to catch common user mistakes when they enter an email address, like, for instance, typing
[email protected] instead of
[email protected] .
Suppose you want to use a definite email validation message. In that case, I suggest you send an email message with a link that uses a secret code you store in a database table to associate the email address with the code.
When the user receives the message, the user may click on the link that makes the user's browser go to a page that you can handle with a PHP script that checks if the code in the connection matches the email address you want to validate.
I suggest you use the methods provided in this class with the email message and link validation method.