<% 'CUT AND PASTE ALL OF THE BELOW INTO THE LAYOUT'S CONTENT AREA FOR THE SITE IN QUESTION %> <%If Len(Request.Form("submit")) > 0 Then If Len(Request.Form("YName")) > 0 Then fYName = Request.Form("YName") Else strMessage = strMessage & "[»] You did not enter your name.
" End If If Len(Request.Form("YEmail")) > 0 Then fYEmail = Request.Form("YEmail") If Instr(fYEmail, "@") = 0 Or Instr(fYEmail, ".") = 0 Or Instr(fYEmail, " ") > 0 Or Len(fYEmail) < 7 Then strMessage = strMessage & "[»] Your email address appears to be invalid.
" End If Else strMessage = strMessage & "[»] You did not enter your email address.
" End If If Len(Request.Form("FName")) > 0 Then fFName = Request.Form("FName") Else strMessage = strMessage & "[»] You did not enter your friend's name.
" End If If Len(Request.Form("FEmail")) > 0 Then fFEmail = Request.Form("FEmail") If Instr(fFEmail, "@") = 0 Or Instr(fFEmail, ".") = 0 Or Instr(fFEmail, " ") > 0 Or Len(fFEmail) < 7 Then strMessage = strMessage & "[»] Your friend's email address appears to be invalid." End If Else strMessage = strMessage & "[»] You did not enter your friend's email address." End If If Len(Request.Form("Comments")) > 0 Then fComments = Request.Form("Comments") End If If Len(strMessage) = 0 Then On Error Resume Next Set objCDONTS = Server.CreateObject("CDONTS.NewMail") objCDONTS.From = fSender objCDONTS.To = fFEmail If Len(fBCC) > 0 Then objCDONTS.BCC = fBCC End If objCDONTS.Subject = fYName & " has sent you a site referral for " & strSiteTitle & ": " & strSiteURL strBody = fYName & " sent you this referral at:" & vbCrLf strBody = strBody & "-----------------------" & vbCrLf strBody = strBody & "Date: " & FormatDateTime(Date, 1) & vbCrLf strBody = strBody & "-----------------------" & vbCrLf strBody = strBody & "Time: " & FormatDateTime(Now, 3) & vbCrLf strBody = strBody & "-----------------------" & vbCrLf strBody = strBody & "Your Friend's Name: " & fYName & vbCrLf & vbCrLf strBody = strBody & "Your Friend's Email: " & fYEmail & vbCrLf & vbCrLf If Len(fComments) > 0 Then strBody = strBody & "Your Friend's Comments: " & fComments & vbCrLf End If strBody = strBody & "-----------------------" & vbCrLf strBody = strBody & "About " & strSiteTitle & vbCrLf strBody = strBody & "-----------------------" & vbCrLf & vbCrLf strBody = strBody & strSiteMessage & vbCrLf & vbCrLf strBody = strBody & "To find out more, visit us online today at " & strSiteURL & " !" & vbCrLf & vbCrLf strBody = strBody & UCase(strSiteTitle) & vbCrLf strBody = strBody & strSiteTagline & vbCrLf strBody = strBody & strSiteURL & vbCrLf & vbCrLf strBody = strBody & "-----------------------" & vbCrLf & vbCrLf objCDONTS.Body = strBody objCDONTS.Send Set objCDONTS = Nothing %>
Thank you! Your submission was successful!
You submitted the following information on <%= FormatDateTime(Date, 1) %> at <%= FormatDateTime(Now, 3) %>:
Your Name: <%= fYName %>
Your Email: <%= fYEmail %>
Your Friend's Name: <%= fFName %>
Your Friend's Email: <%= fFEmail %>
<% If Len(fComments) > 0 Then %>
Your Comments: <%= fComments %>
<% End If %>
Your email will contain the following message:
<%= strSiteMessage %>
To find out more, visit us online today at <%= strSiteURL %>!
Thank you for referring our site! We appreciate your interest in letting others know about our services.
Please click here to return to our homepage and continue browsing!
Your submission was not successful.
The following information was missing:
<%= strMessage %>
<% End If
Else
%>
Thanks for letting others know about our services!
PLEASE NOTE: The message will not be sent without all form fields being completed.
<% End If %>