home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 December / INTERNET97.ISO / pc / software / windows / building / scriptworx / n4932.exe / cdonts.asp < prev    next >
Encoding:
Text File  |  2001-06-05  |  2.1 KB  |  79 lines

  1. <%@ Language="vbscript"%>
  2. <HTML>
  3. <HEAD>
  4. <TITLE>ASP Wizard 1.1C - (Your Title)</TITLE>
  5. </HEAD>
  6. <Center><H1><Font Color="#000000">ASP Wizard 1.1C - (Your Title)</Font></H1></Center>
  7. <%If Request.ServerVariables("REQUEST_METHOD") = "POST" Then%>
  8. <BODY bgColor="#ffffff" Background="">
  9. <p Align="center"><FONT Face="Arial, geneva" size="5"> Email Form</FONT></p>
  10. <%
  11. Dim Name
  12. Dim SenderEmail
  13. Dim Subject
  14. Dim Recipient
  15. Dim Body
  16.  
  17. Name = Request.Form("name")
  18. SenderEmail = Request.Form("email")
  19. Subject = "Regarding " & Request.Form ("subject")
  20. Recipient = Request.Form("recipient")
  21. Body = Request.Form("body")
  22.  
  23. Set ObjMail = Server.CreateObject ("ObjMail.SMTPMail")
  24. ' Get the Senders mailbox from a form.
  25. ObjMail.FROM = Senderemail
  26. ' Get the Subject from a form.
  27. ObjMail.Subject = Subject
  28. ' Get the recipients mailbox from a form.
  29. ObjMail.TO Recipient
  30.  
  31. ' The body property is both read and write.
  32. ' If you want to append text to the body you can
  33. ' use Cdonts.Body = Cdonts.Body & "Hello world! "
  34. ObjMail.Body = Body
  35.  
  36. ' Send it...
  37. ObjMail.Send
  38. Set ObjMail= Nothing
  39. %>
  40. <center>
  41.    <FONT Face="Arial, geneva" size="3">Your email has been sent to<%=Recipient%><BR>
  42. </FONT>
  43. </center>
  44. <%Else%>
  45. <FORM Method="post" Action="fucku_CDonts.asp">
  46. <TABLE border="1" cellpadding="0" cellspacing="0" Align="center"  borderColor="#000000" Background="" > 
  47. <TR>
  48.     <TD colspan="2" Align="middle">Complete this form and click the submit-button. We will answer your questions as soon as possible.</TD>
  49. </TR>
  50. <TR>
  51.     <TD>Your name</TD><TD><INPUT size="25" name="name" 
  52.  ></TD>
  53. </TR>
  54. <TR>
  55.     <TD>Your email</TD><TD><INPUT size="25" name="email" 
  56.  ></TD>
  57. </TR>
  58. <TR>
  59.     <TD>Recipient email</TD><TD><INPUT size="25" name="recipient" 
  60.      ></TD>
  61. <TR>
  62.     <TD>State your business</TD><TD><select name="subject" size="1">
  63. <option Value="help" selected>help
  64. <option Value="tips">tips
  65. <option Value="other">other</option>
  66. </select>
  67. </TD></TR>
  68. <TR>
  69.     <TD>Enter your question</TD><TD><TEXTAREA name=body rows=15 wrap=PHYSICAL cols=40></TEXTAREA></TD>
  70. </TR>
  71. <TR rowspan="2">
  72.     <TD ><INPUT Type="submit" Value="Submit"></TD>
  73. </TR>
  74. </TABLE>
  75. </FORM>
  76. <%End IF%>
  77. </BODY>
  78. </HTML>
  79.