|
i am lost i cannot figure out how to send a simple asp form that will send to my email address and go to a thank you page. if there is anyone who can help me i would greatly appreciate it. thanks.
|
|
|
are these two separate files?
|
|
|
Nope. One ASP script file. That's the beauty of it.
Save this as TestEmail.asp. Then run it. The first time you hit the script, there is not a form submitted, so Request.Form.Count = 0, which caused the "else" to fire--which sends your FORM to the user.
When the user submits the FORM, this time Request.Form.Count is greater than 0, so the first part of the script fires -- which processes the form, sends an email, and returns a thank you message.
See?
|
|
|
|
|
can i test this through localhost? i appreciate all the help
|
|
|
Sure, but you need to install the ASPEmail component from Persits I referenced.
If you don't want to install that component or you just don't want to yet, but you want to see how this script functions, just comment out the lines that instantiate and reference the MailSender object. It wont send an email of course, but you can see how it creates the form, then returns a thank you page when you submit the form.
http://localhost/TestEmail.asp
|
|
|
|
|
i did install in email componet i don't know what to put in the places for the "Mail." sections. Another questions is what do i have to change for it to only send the email to me with the form information?
|
|
|