473,499 Members | 1,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is the correct way to make a confirmation email?

5 New Member
Hi Friends,

I have a Registration page which uses ASP.NET and I want to send a unique value by which i can be sure that the email address is of that user only.
Also i want to enhance the security in that page by making read image and type its contents into a field(Textbox) to validate.

Note:i've read a mail about this topic in that link:
http://www.thescripts.com/forum/thread610549.html
but it didn't explain how to u use it

Do you know how to do this???
Sep 28 '07 #1
4 4023
ak1dnar
1,584 Recognized Expert Top Contributor
On your user registration table;
Add two new columns:
1. email_status
2. Authentication_key

By default you can set the email_status to UNCONFIRMED state. and for the Authentication_key field set a random key. [Better to set a unique one]

And to the supplied email address send this key with the email address as url parameters.
Expand|Select|Wrap|Line Numbers
  1.  http://www.thescripts.com/do_verification.aspx?key=jkj32094534jhsjf&email=mail@domain.com
Then when user clicks the link, from do_verification.aspx script you should verify the email address, random key against the database records, then you can set the email_status as CONFIRMED.
Sep 28 '07 #2
Reklawthgin
3 New Member
If I understand fully, you have a page where a registrant will fill out, click a button, and upon submission, it will also send a confirmation email.

There is two quick & easy ways of doing this.

First, you will need to use the "System.Net.Mail.SmtpClient class".
- Dim smtp as new System.Net.Mail.SmtpClient(<--server address goes here-->)
Second, you will need a message to be sent. This will derive from the System.Net.Mail.MailMessage class.
- Dim msg As New Net.Mail.MailMessage(<--from-->, <--to who-->)
Next, set the subject for this email by:
- msg.Subject = <-something->
Next, enable html within the message by settings .IsBodyHtml.

Now, you're ready for the body or content, so choose your way:

Option 1) Storing HTML content prewritten in a String
store the html of the content (body) of the email in a string
- some string = "<body><table><tr><td> hello!</td></tr></table>...."


Option 2) Provide another page (or view) which it's HTML will be used)
use an ASP.NET Multiview control and upon the click event (submission), send them from View1 to View2 which will hold in a Panel control the contents of the email's body.
You will then need to "rip" the html of the contents in that panel to send. This can easily be done by using a string builder & writer:

Dim str As String = "" 'declare the string
Dim sb As New StringBuilder 'declare the string builder
Dim sw As New IO.StringWriter(sb) 'declare the string writer
Dim hw As New HtmlTextWriter(sw) 'declare the html writer
View2.RenderControl(hw) 'now do the magic!
msg.Body = sb.ToString 'and set the body toexactly this.

Wahh lahh! Send it and your done!
Sep 28 '07 #3
Fouly
5 New Member
Thanks a lot for your help and when we finish our website i'll send u a link to see what we have done
Sep 29 '07 #4
Reklawthgin
3 New Member
No problem. Glad I could help!


--------------------------------------------
Reklawthgin (walter)
Software Manager
Oct 5 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
24159
by: Craig | last post by:
Hi, I'm working on a PHP FTP client, but my testers have complained the delete file link is too easy to hit by mistake. Would it be possible/plausible to write a bit of javascript that pops up a...
28
14213
by: PerryC | last post by:
Anyone know how to auto close the parent / opener window without confirmation? I have tried: <script> opener.window.close() </script> ----I put it in the child html page, and nothing...
6
3400
by: Dave | last post by:
Hello. I want to prompt user for some action with Yes/No message, I know some tricks in JavaScript, but I need to handle the user answer at server side. Exactly I want to prompt user for...
2
1634
by: Tatyana | last post by:
Hello, I'm having problems to Style Order Confirmation Email Body. I'm sending it out as HTML. Everything looks fine in Outlook, but hotmail accounts (checked it on yahoo and hotmail) seem to...
2
7696
by: bay_dar | last post by:
Hi, I have an internal ASP.NET application that I'm are using to send e-mails out based on a single milepost or milepost range entered. I'm trying to do two things when a user clicks on the...
1
2463
by: Mahernoz | last post by:
Hi Friends, I have a Registration page which uses Asp.net CreateUserWizard Control. Now I want to send a unique value(a guid) by which i can be sure that the email address is of that user only....
1
2559
by: kang jia | last post by:
hi currently i am editing signup page, when user enter deupicated NRIC and click signup, they will go to do_signuppage and read the error message and then after 5 seconds, they will be redirected...
1
3206
by: kang jia | last post by:
hi when user entered particulars in signuppage and click" signup" button, i will direct them to do_signup.php. if say the NRIC is dupicate in datebase, i will redirect them back to signup page...
2
2224
by: kaka | last post by:
I am developping a sns site. I was wondering if i send user's email addresses as a part of confirmation link so that when a user receives the confirmation email, he can just click on the link to...
6
7263
Soniad
by: Soniad | last post by:
Hello, I am excecuting a stored procedure in my ASP page , it has one out parameter (@confirm) . after executing the procedure i want to retreive this out parameter and assign it to variable...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.