%@ 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" %> <% set rs = cn.Execute("SELECT people.title,people.firstname,people.lastname,people.email FROM people WHERE people.peopleID = "& request.querystring("ID") &";") rs.movefirst dim action dim text_string dim OK dim subject dim this_URL dim strBody dim i dim rs2 dim sendername 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(rs("email")) = "False" THEN OK = 0 text_string = "It seems that our "& LCase(Agent) &"'s email address is temporarily unavailable, or perhaps they typed it incorrectly. It is not a valid email address. Please contact another "& LCase(Agent) &", the webmaster, or the administrator of this web site regarding this property...you might also mention in your message that "& rs("firstname") &" needs to update their email address." END IF IF OK = 1 THEN set rs2 = cn.Execute("SELECT * FROM people WHERE peopleID = 1;") rs2.movefirst subject = rs2("companyname") this_URL = rs2("URL") rs2.close set rs2 = nothing subject = subject & ": "& request.form("subject") strBody = "" strBody = strBody & "
" strBody = strBody & "" strBody = strBody & "Hello "& rs("firstname") strBody = strBody & "
" strBody = strBody & "This is a message from a visitor of your web site, "& this_URL &", named " IF request.form("sender_name") <> "" AND request.form("sender_name") <> "Your Name" THEN strBody = strBody & request.form("sender_name") sendername = request.form("sender_name") ELSE strBody = strBody & request.form("sender_email") sendername = request.form("sender_email") END IF strBody = strBody & ".
" IF Len(request.form("memo")) > 0 THEN 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 & " sends this message:"& request.form("memo") &"" END IF strBody = strBody & "
You can Reply to this visitor directly by choosing "Reply" in the toolbar above.
" strBody = strBody & "" strBody = strBody & "" i = SendEmail(request.form("sender_email"),sendername,rs("email"),rs("firstname"),"","",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. We will respond as soon as possible.
<% ELSE %>