%@ Language=VBScript %>
<%
if len(Request.Form("submit")) > 0 then
' Checks to see if the user inputted a value
' If so, remove leading and trailing blanks and upcase it
u_email= ucase(trim(request.form("email")))
' Grab the length of the email address inputted
email_len=len(u_email)
' if the user has inputted a value start checking it
if trim(u_email) <> "" then
' Loop that will check each character of the inputted value
' for the @ and the dot
for counter = 1 to email_len
'If there is an @ set u_at to the position it was found in
if mid(u_email,counter,1)="@" then
' count the number of @'s
at_counter=at_counter+1
' if there is more than one add it to the message
if at_counter > 1 then message = message &"There appear to be multiple @'s in the email address
" end if
' if this is the 1st @ note the location in the string
if u_at = "" then
u_at=counter
end if ' end check for first @
end if ' end check for the @
'If there is an dot (.) set u_dot to the position it was found in
if mid(u_email,counter,1)="." then
if u_dot = "" then
u_dot=counter
end if 'end check for the first dot
end if 'end check for the dot
next
' Check to see if the dot comes after the @
' and that the first dot is not the last character
if (u_dot < u_at) or (len(u_email) <= u_dot+1) or ((u_dot-u_at) < 2) then
message = message & "Email format appears to be wrong
"
end if 'end check for dot after the @
' Scan the user input to see that all inputted values are either a letter A-Z,
' a number 0-9 or if the character is a . or and @.
for counter=1 to len(u_email)
if (mid(u_email,counter,1) <> "/") and ((mid(u_email,counter,1) > chr(45)) and (mid(u_email,counter,1) < chr(58))) or ((mid(u_email,counter,1) > chr(63)) and (mid(u_email,counter,1) < chr(91))) then
else
' If it's an invalid charcter add it to the display message
message = message & "Invalid character "& mid(u_email,counter,1)& " found in email address
"
end if 'end check for invalid characters
next 'end loop for invalid characters
end if 'end check for user input
' If the email address os not OK than display the message(s)
' and show the text box for user input with the last value pre-filled
if u_email = "" then
message = "Please enter a valid email address."
end if
if message = "" then
dim body
body = body & "Name: " & Request.Form("name") & vbcrlf
body = body & "Email: " & Request.Form("email") & vbcrlf
body = body & "Referred By: " & Request.Form("referral") & vbcrlf
body = body & "Put On Mailing List: " & Request.Form("maillist") & vbcrlf
body = body & "Comments: " & Request.Form("comments") & vbcrlf
dim objMsg
set objMsg = Server.CreateObject("CDONTS.NewMail")
objMsg.From = "sovenall@nc.rr.com"
objMsg.To = "sovenall@nc.rr.com"
'objMsg.To = "ovenall@netenterprises.com"
objMsg.Subject = "Message from TheFool.com"
objMsg.body = body
objMsg.send
set objMsg = nothing
Response.redirect "thanks.asp"
end if
end if %>
Write to UsIf you have a comment on this website or Victoria Regina Tarot, we would love to hear from you. You can fill out the handy form, or send email to:
Sarah: sarah@thefool.com If you are writing about a usage request, please read the usage guidelines page. Note: Due to time constraints, we unfortunately cannot provide personalized Tarot readings online. You can get a computer generated reading from this site, but if you want a reading from a live, skilled person, visit The Free Reading Network, an organization sponsored by the American Tarot Association. <% =message %>
|
||||