Share High Strange New Mexico
|
<% If Request.QueryString("action") = "" then
%>
Send to a friend
<%
If Request.ServerVariables("HTTP_REFERER")="" then
referringurl = "http://www.high-strange-nm.com"
Else
referringurl = Request.ServerVariables("HTTP_REFERER")
End If
%>
<%
'This is for the big if
'statement at the top of the
'page.
Else
'Set variables.
subject = request.form("subject")
sender = request.form("sender")
recipient = request.form("recipient")
comments = request.form("comments")
referringurl = request.form("referringurl")
' Create the body of the email
body = comments & "" & chr(13) & chr(13)
body = body & referringurl & chr(13)
' Instantiate the CDONTS component
Set objMail = Server.CreateObject("CDONTS.NewMail")
' Send email
objMail.From = sender
objMail.To = recipient
objMail.Subject = subject
objMail.Body = body
objMail.Send
' Release the CDONTS component to free resources
Set objMail = Nothing
' Redirect back to response page
Response.Redirect referringurl
'Response.Redirect ("test.asp")
End If
%> |
|
|
|