|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
form
What is needed to create a form for sending e-mails via website?
Thank you. |
|
#2
|
||||
|
||||
|
If you have SMTP installed, you can use that:
1) The form in your html page: <form name="form1" action="sendmail.asp" method="post"> <input type="text" name="subject"> <input type="text" name="email"> <input type="text" name="body"> <input type="submit" name="submit" value="Submit"> </form> 2) The action page ASP: (sendmail.asp) <% Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail") With objCDO .To = "me@email.com" '---valid email .From = Request.Form("email") '---valid email .Subject = Request.Form("subject") .Body = Request.Form("body") .Send End With Set objCDO = Nothing %> |
|
#3
|
||||
|
||||
|
www.asp101.com has some e-mail examples in the Samples section. The e-mail attachment example uses the more recent CDO instead of the tried-and-true but outdated-on-some-newer-servers CDONTS.
![]()
__________________
J. Paul Schmidt www.Bullschmidt.com - Freelance Web and Database Developer www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|