% '*** How to send the results of '*** a form through email using '*** ASP and CDNOTS. '*** Declare your variables Dim BodyToSend, Message '*** Check to see if the SendButton '*** was pressed, and if there is '*** and message to be sent. If not, '*** display the feedback form. If Request.Form("SendButton") <> "Send" or Request.Form("bodytext") = "" Then %>
![]() |
|
|
|
For
a free personal |
Associates Green
Thumb Party Woven
Paint
|
|
||||||||
|
Bostoncatalog.com - Business catalog / directory in Boston,MA largest business directory in Boston Area
|
<% '*** If the SendButton was clicked '*** and there is a message to send, '*** process the email and send it. Else '*** Create the message object. Set Message = CreateObject("CDONTS.NewMail") '*** Set the from, to, and '*** subject fields. Message.From = Request.Form("email") Message.To = "erin@ecrowley.com" Message.Subject = "Feedback Form" '*** Add any additional informtion '*** you want to the message text. BodyToSend = Request.Form("bodytext") & vbcrlf & _ " " & vbCRLF & _ "***From the Code Library ***" '*** Set the altered body text. Message.Body = BodyToSend '*** If there is an error, '*** continue with the script. On Error Resume Next '*** Send the email message. Message.Send '*** If sending the message caused '*** an error, then display the '*** message, else display a '*** success message (or redirect '*** to a different page). If Err.Number = 0 Then Response.Redirect "thank.htm" Else Response.Write "Error: " & Err.Description End If '*** Clear out the message variable Set Message = Nothing '*** End of If for checking '*** SendButton and message '*** to send. End If %>