<% 'Contact_Us_Form.asp ' ' Created: 03/03/2004 ' Author: Jon Board ' ' This form accepts user input and posts it to a request handler. '********************************* 'Form Globals dim mailto dim mailfrom dim mailsubject 'configuration settings 'mailto = "dcentoni@andreini.com" mailto = "jd@keypoint.com" mailfrom = "info@andreini.com" mailsubject = "More Insurance Information Requested" '----------------------------- 'Mail Sending Subroutine ' Send Verio Mail Using This code. ' Dependencies: ' mailfrom = The From Address (see top of script) ' mailto = The To Address (see top of script) ' mailSubject = The Subject of the Mail. (see top of script) ' This subroutine is called later in the script and sends mail via the CDO objects '----------------------------- SUB sendmail( fromWho, toWho, Subject, Body ) Dim objCDO Dim iConf Dim Flds Const cdoSendUsingPort = 2 Set objCDO = Server.CreateObject("CDO.Message") Set iConf = Server.CreateObject("CDO.Configuration") Set Flds = iConf.Fields With Flds .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "mail-fwd" .Item(cdoSMTPServerPort) = 25 .Item(cdoSMTPconnectiontimeout) = 10 .Update End With Set objCDO.Configuration = iConf objCDO.From = fromWho objCDO.To = toWho objCDO.Subject = Subject objCDO.TextBody = Body objCDO.Send END SUB 'form values dim errorLevel dim firstName dim middleName dim lastName dim companyName dim street1 dim street2 dim city dim state dim zip dim homePhone dim cellPhone dim workPhone dim mayWeContactYouAtWork dim emailAddress dim insuranceTypeList dim businessList dim numOfEmps dim renewalDate dim businessRisks dim officeChoice dim mailMsg dim CRLF CRLF = Chr(13) & Chr(10) 'initialize values to nothing mayWeContactYouAtWork = 0 if Request.Form("tbFname") = null then errorLevel = 1 firstName = Request.Form("tbFname") middleName = Request.Form("tbMI") lastName = Request.Form("tbLastName") companyName = Request.Form("tbCompany") street1 = Request.Form("tbAddress1") street2 = Request.Form("tbAddress2") city = Request.Form("tbCity") state = Request.Form("tbState") zip = Request.Form("tbZip") homePhone = Request.Form("tbHomePhone") cellPhone = Request.Form("tbCellPhone") workPhone = Request.Form("tbWorkPhone") mayWeContactYouAtWork = Request.Form("rbWork") emailAddress = Request.Form("tbEmail") for counter = 1 to Request.Form("InsuranceType").Count if Request.Form("InsuranceType")(counter) = "Other" then insuranceTypeList = insuranceTypeList & " " & "Other: " & Request.Form("tbOtherType") & crlf else insuranceTypeList = insuranceTypeList & " " & Request.Form("InsuranceType")(counter) & crlf end if next for counter = 1 to Request.Form("BusinessIndustry").Count if Request.Form("BusinessIndustry")(counter) = "Other" then businessIndustry = businessIndustry & " " & "Other: " & Request.Form("tbOtherIndustry") & crlf else businessIndustry = businessIndustry & " " & Request.Form("BusinessIndustry")(counter) & crlf end if next numOfEmps = Request.Form("tbNumberOfEmps") renewalDate = Request.Form("tbRenewalDate") businessRisks = Request.Form("tbBusinessRisks") officeChoice = Request.Form("slOfficeChoice") if Request.Form.Count > 0 then 'debugoutput() buildMailMessage() 'call new mail message here sendMail mailfrom, mailto, mailsubject, mailMsg Response.Redirect("form_response.html") end if sub debugoutput Response.Write(crlf & "--------- Contact Request ---------" & crlf) Response.Write("First: " & firstName & "
") Response.Write("Middle: " & middleName & "
") Response.Write("Last: " & lastName & "
") Response.Write("Company: " & companyName & "
") Response.Write("Street1: " & street1 & "
") Response.Write("Street2: " & street2 & "
") Response.Write("City: " & city & "
") Response.Write("State: " & state & "
") Response.Write("Zip: " & zip & "
") Response.Write("HomePhone: " & homePhone & "
") Response.Write("cellPhone: " & cellPhone & "
") Response.Write("workPhone: " & workPhone & "
") Response.Write("Contact? " & mayWeContactYouAtWork & "
") Response.Write("email: " & emailAddress & "
") Response.Write("InsuranceType: " & insuranceTypeList & "
") Response.Write("businessList: " & businessIndustry & "
") Response.Write("numOfEmps: " & numOfEmps & "
") Response.Write("RenewalDate: " & renewalDate & "
") Response.Write("risks: " & businessRisks & "
") Response.Write("Office Choice: " & officeChoice & "
") end sub sub buildMailMessage mailMsg = crlf & "--------- Contact Request ---------" & crlf mailMsg = mailMsg & "First: " & firstName & CRLF mailMsg = mailMsg & "Middle: " & middleName & CRLF mailMsg = mailMsg & "Last: " & lastName & CRLF mailMsg = mailMsg & "Company: " & companyName & CRLF mailMsg = mailMsg & "Street1: " & street1 & CRLF mailMsg = mailMsg & "Street2: " & street2 & CRLF mailMsg = mailMsg & "City: " & city & CRLF mailMsg = mailMsg & "State: " & state & CRLF mailMsg = mailMsg & "Zip: " & zip & CRLF mailMsg = mailMsg & "Home Phone: " & homePhone & CRLF mailMsg = mailMsg & "Cell Phone: " & cellPhone & CRLF mailMsg = mailMsg & "Work Phone: " & workPhone & CRLF mailMsg = mailMsg & "Contact? " & mayWeContactYouAtWork & CRLF mailMsg = mailMsg & "Email: " & emailAddress & CRLF mailMsg = mailMsg & "Insurance Type: " & CRLF & insuranceTypeList & CRLF mailMsg = mailMsg & "Business List: " & CRLF & businessIndustry & CRLF mailMsg = mailMsg & "Number Of Emps: " & numOfEmps & CRLF mailMsg = mailMsg & "Renewal Date: " & renewalDate & CRLF mailMsg = mailMsg & "Risks: " & businessRisks & CRLF mailMsg = mailMsg & "Office Choice: " & officeChoice & CRLF end sub %> Andreini & Company - Insurance Information Request















Andreini & Company provides insurance, Risk Management and Employee Benefits to clients throughout California.

Please complete the following form to receive more information about our insurance services. You will receive an immediate email acknowledgement and a sales person will call to complete your request.

For Insurance Information

Contact Information
Full Name:
(First, Middle Initial, Last)
Company Name:

Current Address 1:

Address 2:
City, State, Zip:
Home Phone:
Cell Phone:

Work Phone:

May we contact your at work?


Yes No
E-mail Address:

Insurance Information Requested
Insurance Type:

Property and Casualty
Employee Benefits
Workers Compensation
Surety and Fidelity Bonds

Personal Lines
Aviation
Other
    

Your Business Industry:

Agribusiness
Cattle Ranchers
Commercial Building Service Contractors
Messengers/Courier Services

Furniture Manufacturers
Petroleum Industry
RV Dealers
High Tech Industry
Bio Tech
Transportation
Workers Compensation
Aviation

Other     

Number of Employees?:
Renewal Date of Current Insurance?:
(MM/DD/YYYY)

What Business Risks Require Protection?:

Which Office have you worked with in the past or is nearest to you?