Send email to client to check whether or not [duplicate]

2

I made a registration to be inserted the cpf and email, the cpf I could validate right, to see if it works or not. But when it comes to the part of knowing if the email exists ... I researched a lot and saw a way, which is to send an email to the user, and if the email is sent, that is, not return, it exists. But I have no idea how to do this, can someone give me a light?

    
asked by anonymous 28.11.2017 / 17:35

1 answer

6

To check if an email exists, you need to create one more step in your email. When the user registers, register their status as "pending" or something, and send a confirmation email to the address given. The email should contain a unique link from that user, such as an informed email hash + some arbitrary value like salt.

When the user accesses the link (pointing to your system), you check the last hash, and update the status to "registered."

    
28.11.2017 / 17:54