%
'The header/footer for the email.
Const strHeader = "Tech Support Request"
Const strFooter = "Tech Support Request End"
'Who does this go to? MAKE SURE TO CHANGE THIS TO YOUR EMAIL ADDRESS!
Const strTo = "rvoffice@realvisionsoftware.com"
'This information is optional
Dim strFrom, strSubject, strRedirectURL, strFromPath
strFrom = Request.Form("txtSendToEmailAddress")
if Len(strFrom) = 0 then strFrom = strTo
strSubject = Request.Form("txtEmailSubject")
if Len(strSubject) = 0 then strSubject = "Technical Support Request"
strRedirectURL = Request.Form("urlSendTo")
if Len(strRedirectURL) = 0 then strRedirectURL = "/"
strFromPath = Request.Form("urlFromPath")
if Len(strFromPath) = 0 then strFromPath = ""
Dim strBody
strBody = strHeader & ( vbCrLf & vbCrLf )
strBody = strBody & ( "FORM: " & strFromPath & vbCrLf ) & _
( "FORM submitted at " & Now() & vbCrLf & vbCrLf )
dim ix, formElementName, formElementValue, prefix, fldName
For ix = 1 to Request.Form.Count
formElementName = Request.Form.Key(ix)
formElementValue = Request.Form.Item(ix)
' what type of field was that on the form?
'prefix = Left(formElementName,3)
' and throw away prefix to get actual field name
fldName = Mid(formElementName,4)
' but change periods to spaces for readability
fldName = Replace(fldName, "."," ")
strBody = strBody & (fldName & ": " & formElementValue & vbCrLf & "
")
Next
strBody = strBody & ( vbCrLf & strFooter )
'Time to send the email
Dim objCDO
Set objCDO = Server.CreateObject("CDO.Message")
objCDO.To = strTo
objCDO.From = strFrom
objCDO.Subject = strSubject
objCDO.Body = strBody
objCDO.Send
Set objCDO = Nothing
'Send them to the page specified
Response.Redirect strRedirectURL
%>