Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
2.75/5 (4 votes)
See more:
how to send a verification link to user email in asp.net
Posted
Comments
ZurdoDev 28-Sep-12 8:15am    
Using the System.Net namespace.
Sandeep Mewara 3-Nov-12 16:45pm    
Tried anything?

This can be done in many ways (may vary on business requirements).

Following can be one way:
1. Generate a verification unique id for that user
2. Create a page to check verification on which you can show message after verification (successful/failed).
3. Email user the link to above page by adding verification id as query string (you can add encoding ligic here).
4. As soon as user clicks on verification link, read querystring and write your verification logic here.
5. Show message based on above verification logic.

Hope this will help you.

~Amol
 
Share this answer
 
Comments
aashi310 8-Nov-12 7:32am    
thanx,i will try this..
On button click:
C#
MailMessage mm = new MailMessage();
        mm.To.Add(new MailAddress("yourwebsitemailchecker@gmail.com", "Request for Verification"));
        mm.From = new MailAddress("yourwebsitemailid@gmail.com");
        mm.Body = "click here to verify fgdfgdfgdfgdfgdfgdfgfdg";
        mm.IsBodyHtml = true;
        mm.Subject = "Verification";
        SmtpClient smcl = new SmtpClient();
        smcl.Host = "smtp.gmail.com";
        smcl.Port = 587;
        smcl.Credentials = new NetworkCredential("yourwebsitemailid@gmail.com", "yourmailpasswrod");
        smcl.EnableSsl = true;
        smcl.Send(mm);

In the above you've to check mail checker in querystring custid

then you can check that yourwebsitemailchecker for inbox with that custid mailid
If it exists means that user verified If not follow one more send verification
 
Share this answer
 
v2
Comments
aashi310 8-Nov-12 7:32am    
thanx,i will try this..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900