<%@Language=VBScript %> <% if Request.QueryString("isSubmitted") = "yes" then 'validate and then submit the form Dim bglobalError Dim FromtheEmail Dim FromtheFirstName Dim FromtheLastName dim theMessageBody Dim FromtheAddress Dim FromtheCity Dim FromtheState bglobalError = 0 FromtheFirstName = Request.Form("FromFirstName") FromtheLastName = Request.Form("FromLastName") FromtheEmail = Request.Form("Fromemail") FromtheAddress = Request.Form("FromAddress") FromtheCity = Request.Form("FromCity") FromtheState = Request.Form("FromState") theMessageBody = Request.Form("theMessage") if ValidateFromFirstName(FromtheFirstName) = False then Dim ErrorFromFirstName ErrorFromFirstName = "*Please enter a valid first name.
" bglobalError = bglobalError + 1 'increment to show there was an error end if 'if ValidateToFirstName(TotheFirstName) = False then 'Dim ErrorToFirstName 'ErrorToFirstName = "*Please enter a valid first name.
" 'bglobalError = bglobalError + 1 'increment to show there was an error 'end if if ValidateFromEmail(FromtheEmail) = False then Dim ErrorFromEmail ErrorFromEmail = "*Please enter a valid email address.
" bglobalError = bglobalError + 1 'increment to show there was an error end if if ValidateMessage(theMessageBody) = False then Dim ErrorTheMessage ErrorTheMessage = "*Please enter something in the message field.
" bglobalError = bglobalError + 1 'increment to show there was an error end if 'if ValidateToEmail(TotheEmail) = False then 'Dim ErrorToEmail 'ErrorToEmail = "*Please enter a valid email address.
" 'bglobalError = bglobalError + 1 'increment to show there was an error 'end if 'validation functions Function ValidateFromFirstName(Expression) 'tests the first name Dim objRegExp Set objRegExp = New RegExp objRegExp.Pattern = "^[a-zA-Z]+$" ValidateFromFirstName = objRegExp.Test(Expression) End Function 'Function ValidateToFirstName(Expression) 'tests the last name 'Dim objRegExp 'Set objRegExp = New RegExp 'objRegExp.Pattern = "^[a-zA-Z]+$" 'ValidateToFirstName = objRegExp.Test(Expression) 'End Function Function ValidateFromEmail(Expression) 'tests the email Dim objRegExp Set objRegExp = New RegExp objRegExp.Pattern = "^[\w\.-]+@[\w\.-]+\.[a-zA-Z]+$" ValidateFromEmail = objRegExp.Test(Expression) End Function Function ValidateMessage(Expression) if Expression = "" then ValidateMessage = False Else ValidateMessage = True end if End Function 'Function ValidateToEmail(Expression) 'tests the email 'Dim objRegExp 'Set objRegExp = New RegExp 'objRegExp.Pattern = "^[\w\.-]+@[\w\.-]+\.[a-zA-Z]+$" 'ValidateToEmail = objRegExp.Test(Expression) 'End Function if bglobalError = 0 then 'if data is valid send the email Dim EmailMessage EmailMessage = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & Chr(13) & Chr(10) & _ "Message sent through your website" & Chr(13) & Chr(10) & _ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ "From: " & FromtheFirstName & " " & FromtheLastName & Chr(13) & Chr(10) & _ "Address: " & FromtheAddress & ", " & FromtheCity & Chr(13) & Chr(10) & _ "State: " & FromtheState & Chr(13) & Chr(10) & _ "Email: " & FromtheEmail & Chr(13) & Chr(10) & _ "Message: " & theMessageBody Set Mail = Server.CreateObject("Persits.MailSender") Mail.Host = "mail.rjmillworksolutions.com" ' Specify a valid SMTP server Mail.From = "2898-rjmsc@rjmillworksolutions.com" ' Specify sender's address Mail.FromName = "RJ Millwork Solutions" ' Specify sender's name Mail.AddAddress "mpelarcik@rjmillworksolutions.com" Mail.Subject = "Website Message" Mail.Body = EMailMessage On Error Resume Next Mail.SendToQueue Set Mail = Nothing If Err <> 0 Then Response.Write "Error encountered: " & Err.Description End If end if end if %> Contact us, we're your one stop custom millwork shop! Wood doors and more
home of RJ Millwork
about our architectural solutions
view our gallery of wood doors, and more...
contact your one stop millwork shop
-----------------------
Contact Us
-----------------------
Wood Doors
   Interior Doors
   French Doors
   Entry Doors

Custom Millwork
   Kitchen Cabinets
   Custom Built-Ins
   Wine Racks
   Casework
   Gazebos

Wood Moldings
Fireplace Mantels
Bathroom Vanities
Wall Panels
-----------------------
vanities
Vanities

mantels
Fireplace Mantels

    Andrew's Workshop - dedicated to helping the new woodworker enjoy the craft of woodworking with basic topics of interest to the new wood artisan.

    woodworking tools - Manufacturers and distributors of industrial quality woodworking drills including twist drills, boring bits, countersinks, router bits, cutters and much more.

<%if Request.QueryString("isSubmitted") = "yes" then%> <%if bglobalError > 0 then%>

There were some errors in the information you tried to send. See below and re-submit your information.
<%if ValidateFromFirstName(FromtheFirstName) = False then%> <%else%> <%end if%> <%if ValidateFromEmail(FromtheEmail) = False then%> <%else%> <%end if%> <%if ValidateMessage(theMessageBody) = False then%> <%else%> <%end if%>
<%=ErrorFromFirstName%> 
First Name
Last Name
First Name
Last Name
Address
City
State
<%=ErrorFromEmail%> 
E-Mail
E-Mail
<%=ErrorTheMessage%> 
Message How may we help you?
Message How may we help you?



<%else%>

Your email was sent successfully!

Please feel free to browse the rest of our site.




<%end if%> <%else%>

Contact us for all your custom millwork needs. Please fill in our form below with as much information as possible. Your information and email address are kept private and not used by anyone other than rjmillworksolutions.com
Some fields are required so that we may better serve you.

First Name
Last Name
Address
City
State
E-Mail
Message How may we help you?




<%end if %>

-----------------------
Request more information


Custom Built Ins


Front Entrances


Wainscoting Panels

Need vintage lighting? Eagle Emporium has the vintage lighting you've been looking for!

Please see the Hummingbird Studios web site at www.hummingbird-studios.com

Legacy Stoneworks - Building Stone A NY stonework company offering affordable stonework services, stone veneer and building stone. High quality granite stone veneer, stonecutting, raw quarried granite building stone and installation.

home   about us   gallery   contact us
    ©copyright 2003, www.rjmillworksolutions.com