Click here to Skip to main content
Sign Up to vote bad
good
See more: ASP.NET
how to send a verification link to user email in asp.net
Posted 28 Sep '12 - 2:04

Comments
ryanb31 - 28 Sep '12 - 8:15
Using the System.Net namespace.
Sandeep Mewara - 3 Nov '12 - 16:45
Tried anything?

2 solutions

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
  Permalink  
Comments
aashi310 - 8 Nov '12 - 7:32
thanx,i will try this..
On button click:
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
  Permalink  
Comments
aashi310 - 8 Nov '12 - 7:32
thanx,i will try this..

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 216
1 Sergey Alexandrovich Kryukov 169
2 Tadit Dash 154
3 Richard MacCutchan 145
4 Santhosh G_ 115
0 Sergey Alexandrovich Kryukov 10,338
1 OriginalGriff 7,965
2 CPallini 4,201
3 Rohan Leuva 3,522
4 Maciej Los 3,159


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 5 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid