<%@ Language="VBSCRIPT" %> <% Option Explicit %> <% ' ********** CHECK REQUIRED ********** Function CheckRequired() Dim blnMetRequired, strName, strEmail blnMetRequired = False strName = Request.Form("Name") strEmail = Request.Form("Email") If Len(strName) > 0 Then If Len(strEmail) > 0 Then blnMetRequired = True End If End If CheckRequired = blnMetRequired End Function ' ********** SEND MESSAGE ********** Function SendMessage() Dim objNewMail, strMail, strMessage Set objNewMail = Server.CreateObject("CDO.Message") objNewMail.From = "noreply@dornickcontruction.net" objNewMail.To = "dornick@comcast.net" 'Request.Form("Recipient") objNewMail.Subject = "Dornick Construction Contact Form" ' Message body strMail = "Who-- " & Request.Form("Name") & vbCrLf strMail = strMail & "Email-- " & Request.Form("Email") & vbCrLf strMail = strMail & "Phone-- " & Request.Form("Phone") & vbCrLf strMail = strMail & "Message-- " & vbCrLf & vbTab & Request.Form("Message") objNewMail.TextBody = strMail ' SMTP server With objNewMail .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "relay-hosting.secureserver.net" .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 '.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/cdoSendUserName") = "" '.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/cdoSendPassword") = "" .Configuration.Fields.Update End With ' Send message objNewMail.Send strMessage = "Form submitted. We look forward to working with you!" Set objNewMail = Nothing SendMessage = strMessage End Function ' ********** MAIN ********** Dim blnRequired, strStatus, strDisable strDisable = "" ' On postback If Request.Form.Count > 0 Then ' Check for required fields blnRequired = CheckRequired() If blnRequired = True Then ' Send message strStatus = SendMessage() ' Disable form strDisable = "disabled" Else strStatus = "Name and Email are required fields." End If Else ' Not postback strStatus = "" End If %> Dornick Construction - [Page Title] ); checkLocation();">

Dornick Construction Logo

Company Contact Information

		John Dornick
		Direct: (612) 250-6665
		E-mail: Dornick@Comcast.net
	

Contact Form

Use the following short form to send an email through this Web site. We'll promptly respond to your query and help you in any way we can.

Your Name :
(Required)
Your Email Address :
(Required)
Your Phone :
>

Message :

>
<%= strStatus %>