Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

About Email Verification - What methods

I just wanted to ask the procedure of email verification, whats the best method. So far i have a class that stores the information from the register.aspx form, then i send out an email to the user, but what should i send him, should i send the user a guid?.

Also my membership class that stores the register data is stored in a session, is this a good idea, becuase if the user session times out then the membership class will be nothing and the user will be prompted to register again in a Session Timeout webpage, is this a good method?

But what if i send the user a guid and then store the user data to the database with the guid and then check the email guid with the corresponding user guid in the database, what should i do?

Also i have a Regular expression that checks that the email is valid, its not that good yet and i havent tested it properly, is there free email verification api's out there?

I am using ASP.NET VB.

like image 461
redoc01 Avatar asked Mar 11 '26 14:03

redoc01


2 Answers

Here is what I would do:

1) Ask for user's email

2) Validate the email using Regex

3) If valid, create a Timestamp (DateTime.Now), append with user's Id and any other useful information that I need. We can use some appropriate delimiters.

4) Encrypt the data and build a URL with the encrypted token and email to user

5) When user clicks, decrypt the information, check the timestamp (perhaps there is a timeout required) and use user's Id to get its data from database.

like image 101
Aliostad Avatar answered Mar 14 '26 02:03

Aliostad


This is in addition to the already accepted answer - I wouldn't limit the email validation to checking the Regex syntax only.

There's a free email verification API I've been using that checks a number of factors, including syntax, typos, SMTP & MX-Records (which verifies the actual existence of the email address), if its a free or disposable email, etc.

They're offering a thousand monthly requests for free - mailboxlayer.com

like image 31
Friendly Crook Avatar answered Mar 14 '26 03:03

Friendly Crook



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!