<% '************************************************************************************************************************************************ 'Dynamic Values - Enter these values before running this script '************************************************************************************************************************************************ mailFrom = "STCF " mailTo = "feedback@stcfoc.org" mailSubject = "Feedback Form" formAction = "feedback.asp" filePathToMap_Feedback = "textfiles\feedback.txt" 'include folder(s), textfile name and ".txt" '************************************************************************************************************************************************ %> STCFOC
Contact Us > Feedback Form
Full Time Staff | Prayer Requests | Feedback Form | Directions

<% if request("textfield") = "" OR request("textfield3") = "" OR request("textfield4") = "" then if request("submit") = "Submit" then %> Please complete all required (*) fields before submitting this form.
<% end if %> <%else Dim filecreate, file set filecreate = CreateObject("Scripting.FileSystemObject") filename = server.MapPath(filePathToMap_Feedback) Set file = filecreate.OpenTextFile(filename,8,0) file.write (request("textfield")) file.write ("|") file.write (request("textfield2")) file.write ("|") file.write (request("textfield3")) file.write ("|") t4_wo_crlf = replace(Request.Form("textfield4"), vbcrlf, " ") file.write (t4_wo_crlf) file.write ("|") file.write (Now) file.write ("|") file.writeline file.close body = "FROM: " & Request("textfield") & "

PHONE NUMBER: " & Request("textfield2") & "

EMAIL: " & Request("textfield3") & "

DATE SENT: " & Now() & "

COMMENTS: " & Request("textfield4") 'MyMail.Body = body 'MyMail.Send 'Set MyMail = Nothing Set MyMail = Server.CreateObject("CDONTS.NewMail") MyMail.From = mailFrom MyMail.To = mailTo MyMail.Bcc = "actsemailarchive@yahoo.com" MyMail.Subject = mailSubject MyMail.BodyFormat = 0 MyMail.MailFormat = 0 MyMail.Importance = 2 MyMail.Body = body MyMail.Send Set MyMail = Nothing ' Const cdoSendUsingPort = 2 ' StrSmartHost = "localhost" ' set MyMail = CreateObject("CDO.Message") ' set iConf = CreateObject("CDO.Configuration") ' Set Flds = iConf.Fields ' ' With Flds ' .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort ' .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost ' .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 ' .Update ' End With ' With MyMail ' Set .Configuration = iConf ' .To = mailTo ' .From = mailFrom ' .Bcc = "actsemailarchive@yahoo.com" ' .Subject = mailSubject ' .HTMLBody = body ' .Send ' End With ' Set MyMail = Nothing ' Set iConf = Nothing ' Set Flds = Nothing %> Your comments have been submitted successfully.
<%end if %> <% if Err.Number <> 0 then url = Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("SCRIPT_NAME") Call ErrorHandler(url) response.Write("

") end if %>

Please enter your questions or comments using the form below.

Name*:
Telephone Number:
E-mail Address*:
Comments*: