%
Response.Buffer = True
Dim stremail,stremail2,strmls,straddress,strcity,ststate,u_body,struserphone,strfrmname
stremail = Request("EMAIL")
stremail2 = Request("EMAIL2")
strmls = Request("MLS")
straddress = Request("A")
strcity = Request("C")
ststate = Request("S")
strfrmname = "HouseViewOnline.com Lead"
Private Function GetFirstname(nametocheck)
nametocheck = Mid(nametocheck,1,Instr(1,nametocheck,"@",1)-1)
nametocheck = Replace(nametocheck,"."," ")
GetFirstname = nametocheck
End Function
If Request("MODE") = "SEND" Then
struserphone = Trim(request.form("User_Phone1")) & Trim(request.form("User_Phone2")) & Trim(request.form("User_Phone3"))
u_body = u_body & strfrmname & vbCrLf
u_body = u_body & "Name: " & Trim(request.form("User_Name")) & vbCrLf
u_body = u_body & "Phone: " & struserphone & vbCrLf
u_body = u_body & "Email: " & Trim(request.form("User_Email")) & vbCrLf
u_body = u_body & "MLS: " & strmls & vbCrLf
u_body = u_body & "Address: " & straddress & vbCrLf
u_body = u_body & "City: " & strcity & vbCrLf
u_body = u_body & "State: " & ststate & vbCrLf
u_body = u_body & "Message: " & Trim(request.form("User_Message")) & vbCrLf & vbCrLf
u_body = u_body & "Form submitted on: " & now() & vbCrLf & vbCrLf
u_body = u_body & "http://www.houseviewonline.com/images/" & strmls & "/" & strmls & ".asp?MLS=" & strmls & vbCrLf
set sm = Server.CreateOBject("JMail.Message")
sm.Logging = True
sm.silent = False
sm.From = Trim(request.form("User_Email"))
sm.FromName = Trim(request.form("User_Name"))
sm.AddRecipient stremail
sm.AddRecipient stremail2
sm.AddRecipient "scott@houseviewonline.com"
'sm.AddRecipient "scott.slinkard@leadphone.com"
sm.Subject = strfrmname
sm.Body = u_body
sm.Send("mail.sitewerkz.com")
set sm = Nothing
Response.Write("Message Sent! " & GetFirstname(stremail) & " Will be Contacting you Shortly...
Please close this window...")
Else
%>
<% End if %>