Buy Now
Sign in

FAQ search

How can I verify an Email Address?

Details
Published: Tuesday, 30 November 1999 00:00

It is often useful to check that a user's email address is valid before sending emails, accepting membership or doing business with them. There are two possible problems, there may be an error in the email itself or someone may have entered another person's email in the form. To check we can send an email to the address asking the user to reply - by clicking a link in the email - if they want to confirm their address.

In this short tutorial, we will see how you can use one of the core ChronoForms features, the Email Address Verification actions:

Create a new db table for your form (or edit the existing one using phpMyAdmin), add 2 extra columns, 1 column to store the verification hash and another to store the verification status, we will call them "vcode" and "vstatus" respectively:

Go to your form and drag an "Email Verification Sender" action to the "On Submit" event of your form:

Now create a new event in your form, call it "verify" and drag an "Email Verification Response" action inside it:

Let's configure the "Email verification sender", click the config icon and do as follows:

We have selected our form's table, entered the hash column name, the status column name, and add the verification link path, which is basically the same form frontend link + &event=verify, this will redirect the user to the verify event when they click the verification link.

Now we need to use an "Email" action to send the verification email itself, as the "Email verification sender" action is actually doing some configuration, but not launching the message, please drag an email action after the "Email verification sender" and use the string in the email template as follows:

P.S: you will have to do the other basic email configuration, for example, you will need to use a "Dynamic To" in order to send the email to the email address used in the form.

Now its time to configure the "Email verification response", the configuration is almost identical:

 

We should then tell our form what to do when the verification is successful or when it is not:

 

That's it!