%@ Language = VBScript %> <% Option Explicit %> <% response.buffer = true response.expiresAbsolute = #1/1/2000# response.CacheControl = "Private" dim relative_path_to_database relative_path_to_database = "../2020applications.mdb" %> <% dim action dim text_string dim OK dim subject dim this_URL dim strBody dim i action = "default" text_string = "" OK = 1 IF len(request.form) > 0 THEN IF CheckEmail(request.form("sender_email")) = "False" THEN OK = 0 text_string = "It seems that your email address is invalid. Perhaps you typed it incorrectly." END IF IF CheckEmail(request.form("recipient_email")) = "False" THEN OK = 0 text_string = "It seems that your friend's email address was wrong. Perhaps you typed it incorrectly." END IF IF OK = 1 THEN set rs = cn.Execute("SELECT * FROM people WHERE peopleID = 1;") rs.movefirst subject = rs("companyname") this_URL = rs("URL") rs.close set rs = nothing set rs = cn.Execute("SELECT * FROM properties WHERE propertyID = "& request.querystring("ID") &";") rs.movefirst subject = subject & ": "& rs("display_title") &" - "& rs("address") IF rs("address") <> "" THEN subject = subject & ", " END IF subject = subject & rs("city") rs.close set rs = nothing strBody = "" strBody = strBody & "
" strBody = strBody & "" strBody = strBody & "Hello" IF request.form("recipient_name") <> "" AND request.form("recipient_name") <> "Friend's Name" THEN strBody = strBody & " "& request.form("recipient_name") &"," ELSE strBody = strBody & "," END IF strBody = strBody & "
" strBody = strBody & "This message was sent by your friend " IF request.form("sender_name") <> "" AND request.form("sender_name") <> "Your Name" THEN strBody = strBody & request.form("sender_name") ELSE strBody = strBody & request.form("sender_email") END IF strBody = strBody & " directly from "& this_URL &". " IF request.form("sender_name") <> "" AND request.form("sender_name") <> "Your Name" THEN strBody = strBody & request.form("sender_name") ELSE strBody = strBody & request.form("sender_email") END IF strBody = strBody & " thought you might be interested in seeing a page on our web site." IF Len(request.form("memo")) > 0 THEN strBody = strBody & "
Your friend sends this message:
"& request.form("memo") &"" END IF IF request.servervariables("HTTP_REFERER") = "" THEN strBody = strBody & "" ELSE strBody = strBody & "" END IF strBody = strBody & "" strBody = strBody & "" i = SendEmail(request.form("sender_email"),FixSymbols(request.form("sender_name")),request.form("recipient_email"),FixSymbols(request.form("recipient_name")),"","",subject,1,strBody,"",1) IF i<>"True" THEN OK = 0 text_string = "
There's been an error and your message could not be sent.
" text_string = text_string & "Please try to send the message again. Our email service gave this error description:" & i &"
" END IF action = "done" END IF END IF %><% IF action = "default" THEN %> <%=text_string%> |
Your message has been sent <% IF request.form("recipient_name") <> "" AND request.form("recipient_name") <> "Friend's Name" THEN response.write("to "& request.form("recipient_name")) %>.
<% ELSE %>