<% dim strNamee, strEmaile, strQuerye strNamee = Trim(Request.form("Firstname")) strEmaile = Trim(Request.form("Vemail")) strquerye = Trim(Request.form("Comments")) if (strNamee <>"" and strEmaile <>"" and strQuerye<>"")then sendform else if Request.servervariables("Content_Length")<>0 Then runerrors else %>
*
Required fields

" Method=POST>
*First Name:
Last Name: 
Street:
City:
State:
Zip:
Country:
*Email:
Phone:
*Comments.
<% end if end if%>
 <% sub sendform Dim strFName, strLName, strStreet, strCity, strState, strZip, strPhone, strCountry, StrEmail, StrComments, strTo, strBody, strOrder strFName = Trim(Request.Form("FirstName")) strLName = Trim(Request.Form("LastName")) strStreet = Trim(Request.Form("Street")) strCity = Trim(Request.Form("City")) strState = Trim(Request.Form("State")) strZip = Trim(Request.Form("Zip")) strCountry = Trim(Request.Form("Country")) strEmail = Trim(Request.Form("VEmail")) strPhone = Trim(Request.Form("Phone")) strOrder = Trim(Request.Form("Order")) strComments = Trim(Request.Form("Comments")) strTO = "mlutz@craftworldmall.com" strBody ="" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & " CraftWorldMall.com Vendor Regisration Application" & vbCrLf _ & " " & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "

First Name: " & strFname & "

" & vbCrLf _ & "

Last Name: " & strLname & "

" & vbCrLf _ & "

Street: " & strStreet & "

" & vbCrLf _ & "

City: " & strCity & "

" & vbCrLf _ & "

State: " & strState & "

" & vbCrLf _ & "

Zip Code: " & strZip & "

" & vbCrLf _ & "

Country: " & strCountry & "

" & vbCrLf _ & "

Email: " & strEmail & "

" & vbCrLf _ & "

Phone: " & strPhone & "

" & vbCrLf _ & "

Order Number: " & strOrder & "

" & vbCrLf _ & "

Comments: " & strComments & "

" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf if IsValidEmail(strEmail) = true then Dim objMail, arecipients set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From = strEmail objMail.To = strTO objMail.subject = "CWM Customer Support " objMail.Body = strBody objMail.BodyFormat = 0 ' CdoBodyFormatHTML objMail.MailFormat = 0 ' CdoMailFormatMime objMail.send Response.Write "Thanks " & strFname & "!" & "
" Response.Write "Your inquiry has been sent.
" Response.Write "We will contact you at " &"" & strEmail & "" & " with an answer." set objMail = Nothing else response.write "" & "Invalid E-mail address: " & "" & stremaile & ". Please click your browser's back button to correct" end if end sub Function IsValidEmail(strEmail) Dim bIsValid bIsValid = True If Len(strEmail) < 5 Then bIsValid = False Else If Instr(1, strEmail, " ") <> 0 Then bIsValid = False Else If InStr(1, strEmail, "@", 1) < 2 Then bIsValid = False Else If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then bIsValid = False End If End If End If End If IsValidEmail = bIsValid End Function sub runerrors if strNamee = "" Then response.write "" & "First Name can not be blank. Please hit your browser's back button to correct
" end if if strEmaile = "" Then response.write "" & "Email address can not be blank. Please hit your browser's back button to correct
" end if if strQuerye = "" then response.write "" & "Comments can not be blank. Please hit your browser's back button to correct
" end if end sub %>