codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  asp form sent to email address ?  thetruth at 21:17 on Friday, February 20, 2004
 

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.

  Re: asp form sent to email address ?  thetruth at 21:34 on Monday, February 23, 2004
 

are these two separate files?

  Re: asp form sent to email address ?  Troy Wolf at 21:58 on Monday, February 23, 2004
 

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?
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: asp form sent to email address ?  thetruth at 22:04 on Monday, February 23, 2004
 

can i test this through localhost? i appreciate all the help

  Re: asp form sent to email address ?  Troy Wolf at 22:10 on Monday, February 23, 2004
 

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
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: asp form sent to email address ?  thetruth at 22:18 on Monday, February 23, 2004
 

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?








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Digital.Canal.Software.V2013
•  Altair_HyperWorks_12.0.1_Win64
•  Global.mapper.V15.0
•  ESI.PAM-RTM.V2010.0
•  KISSsoft.03.2013E.SP5
•  Technical.Toolboxes.Pipeline.Toolbox.2013.Enterprise.v15.0.0
•  Simprotek.Simprosys.V3.0
•  Ricardo.SABR.V6.0p1
•  PSIM.V9.2


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2013