Please Call For Quotes









<%@ page language="java" contentType="text/html" %> <%@ page import="java.util.*" %> <%@ page import="javax.mail.*" %> <%@ page import="javax.mail.internet.*" %> <% // Get the parameter values from the form String REALNAME = "realname" ; String STREET = "street" ; String CITY = "city" ; String STATE = "state" ; String ZIP = "zip" ; String COUNTY = "county" ; String PHONE = "phone" ; String EMAIL = "email" ; String CONTACT = "contact" ; String INCITY = "inCity" ; String VALUELOAN = "valueLoan" ; String VALUEMARKET = "valueMarket" ; String VALUEAPPRAISED = "valueAppraised" ; String YEARBUILT = "yearBuilt" ; String SQUAREFEET = "squareFeet" ; String CONSTRUCTION = "construction" ; String POOL = "pool" ; String ALARM = "alarm" ; String ROOF = "roof" ; String CARRIER = "carrier" ; String CLAIMS = "claims" ; String POLICYTYPE = "policyType" ; String CLOSING = "closing" ; String PROCESS = "process" ; String realname = request.getParameter( REALNAME ) ; if( realname == null ) { realname = "" ; } String street = request.getParameter( STREET ) ; if( street == null ) { street = "" ; } String city = request.getParameter( CITY ) ; if( city == null ) { city = "" ; } String state = request.getParameter( STATE ) ; if( state == null ) { state = "" ; } String zip = request.getParameter( ZIP ) ; if( zip == null ) { zip = "" ; } String county = request.getParameter( COUNTY ) ; if( county == null ) { county = "" ; } String phone = request.getParameter( PHONE ) ; if( phone == null ) { phone = "" ; } String email = request.getParameter( EMAIL ) ; if( email == null ) { email = "" ; } String contact = request.getParameter( CONTACT ) ; if( contact == null ) { contact = "Phone" ; } String inCity = request.getParameter( INCITY ) ; if( inCity == null ) { inCity = "No" ; } String valueLoan = request.getParameter( VALUELOAN ) ; if( valueLoan == null ) { valueLoan = "" ; } String valueMarket = request.getParameter( VALUEMARKET ) ; if( valueMarket == null ) { valueMarket = "" ; } String valueAppraised = request.getParameter( VALUEAPPRAISED ) ; if( valueAppraised == null ) { valueAppraised = "" ; } String yearBuilt = request.getParameter( YEARBUILT ) ; if( yearBuilt == null ) { yearBuilt = "" ; } String squareFeet = request.getParameter( SQUAREFEET ) ; if( squareFeet == null ) { squareFeet = "" ; } String construction = request.getParameter( CONSTRUCTION ) ; if( construction == null ) { construction = "Brick" ; } String pool = request.getParameter( POOL ) ; if( pool == null ) { pool = "No" ; } String alarm = request.getParameter( ALARM ) ; if( alarm == null ) { alarm = "No" ; } String roof = request.getParameter( ROOF ) ; if( roof == null ) { roof = "Composition" ; } String carrier = request.getParameter( CARRIER ) ; if( carrier == null ) { carrier = "" ; } String claims = request.getParameter( CLAIMS ) ; if( claims == null ) { claims = "No" ; } String policyType = request.getParameter( POLICYTYPE ) ; if( policyType == null ) { policyType = "HO-A" ; } String closing = request.getParameter( CLOSING ) ; if( closing == null ) { closing = "" ; } String process = request.getParameter( PROCESS ) ; Properties props = new Properties() ; props.put( "mail.user", "quotedude@a-ace-insurance" ) ; props.put( "mail.from", "quotedude@a-ace-insurance" ) ; props.put( "mail.host", "mail.a-ace-insurance.com" ) ; props.put( "mail.smtp.auth", "true" ); props.put( "mail.smtp.port", "26" ); props.put( "mail.debug", "true" ) ; Session s = Session.getInstance( props, null ) ; MimeMessage mimeMessage = new MimeMessage( s ) ; // Error Hashtable for collecting errors Hashtable error = new Hashtable() ; // Check if a name was transmitted, else error if( realname.equals( "" ) ) { error.put( REALNAME, "Please enter a name" ) ; } // Check for missing phone number with phone contact preference. if( phone.equals( "" ) && contact.equals( "Phone" ) ) { error.put( PHONE, "Please enter your phone number" ) ; } // Check for missing email address with email contact preference. if( email.equals( "" ) && contact.equals( "Email" ) ) { error.put( PHONE, "Please enter your email address" ) ; } InternetAddress to[] = new InternetAddress[3] ; to[0] = new InternetAddress( "peter.polinsky@a-ace-insurance.com" ) ; to[1] = new InternetAddress( "steve@tarterware.com" ) ; to[2] = new InternetAddress( "davec1964@gmail.com" ) ; mimeMessage.addRecipient( Message.RecipientType.TO, to[0] ) ; mimeMessage.addRecipient( Message.RecipientType.TO, to[1] ) ; mimeMessage.addRecipient( Message.RecipientType.TO, to[2] ) ; // Set from address mimeMessage.setFrom( new InternetAddress( "quotedude@a-ace-insurance.com" ) ) ; mimeMessage.setSubject( "Quote request" ) ; mimeMessage.setSentDate( new Date() ) ; // Generate email body StringBuffer text = new StringBuffer() ; text.append( "A quote request was submitted on " ) ; text.append( new java.util.Date().toString() ) ; text.append( "\n--------" ) ; text.append( "\nName : " ).append( realname ) ; text.append( "\nStreet : " ).append( street ) ; text.append( "\nCity : " ).append( city ) ; text.append( "\nState : " ).append( state ) ; text.append( "\nZip : " ).append( zip ) ; text.append( "\nCounty : " ).append( county ) ; text.append( "\nPhone : " ).append( phone ) ; text.append( "\nEmail : " ).append( email ) ; text.append( "\nContact : " ).append( contact ) ; text.append( "\nInside City Limits : " ).append( inCity ) ; text.append( "\nLoan Value : " ).append( valueLoan ) ; text.append( "\nMarket Value : " ).append( valueMarket ) ; text.append( "\nAppraised Value : " ).append( valueAppraised ) ; text.append( "\nYear Built : " ).append( yearBuilt ) ; text.append( "\nSquare Feet : " ).append( squareFeet ) ; text.append( "\nConstruction : " ).append( construction ) ; text.append( "\nPool : " ).append( pool ) ; text.append( "\nAlarm : " ).append( alarm ) ; text.append( "\nRoof : " ).append( roof ) ; text.append( "\nCarrier : " ).append( carrier ) ; text.append( "\nClaims : " ).append( claims ) ; text.append( "\nPolicy Type : " ).append( policyType ) ; text.append( "\nClosing Date : " ).append( closing ) ; text.append( "\n-------\n" ) ; mimeMessage.setText( text.toString() ) ; mimeMessage.saveChanges() ; // First time through, reset the errors if( process == null ) { error = new Hashtable() ; } // Don't try to send the message the first time through if( ( process != null ) && ( error.size() < 1 ) ) { Store store = s.getStore( "pop3" ) ; store.connect( "mail.a-ace-insurance.com", "quotedude@a-ace-insurance.com", "17953e7e3" ) ; // Get INBOX Folder fldr = store.getFolder("INBOX"); fldr.open(Folder.READ_WRITE); int count = fldr.getMessageCount(); Transport transport = s.getTransport( "smtp" ) ; transport.connect( "mail.a-ace-insurance.com", "quotedude@a-ace-insurance.com", "17953e7e3" ) ; transport.sendMessage( mimeMessage, to ) ; %> <%-- Success-Message --%> Thank you for your quote request! <% } else { %> <%-- Error-Message --%> <% if( error.size() > 0 ) { %> Motorcycle Policy Quote Request Error: Field(s) not correct! <% } else { %> Motorcycle Policy Quote Request <% } %>

Give Us a Call or Send Us an E-Mail!! We Would Love to Hear From You!!!

Toll Free: 877-244-1984
9076 Camp Bowie West Fort Worth, TX 76116
Phone: (817) 560-9400 , Fax: (817) 244-1458


peter.polinsky@a-ace-insurance.com



Motorcycle Policy Quote Request Worksheet Under Construction. Please Call For A Quote!

<% String warning = (String) error.get( REALNAME ) ; if( warning == null ) { warning = "" ; } %> <% warning = (String) error.get( STREET ) ; if( warning == null ) { warning = "" ; } %> <% warning = (String) error.get( CITY ) ; if( warning == null ) { warning = "" ; } %> <% warning = (String) error.get( STATE ) ; if( warning == null ) { warning = "" ; } %> <% warning = (String) error.get( ZIP ) ; if( warning == null ) { warning = "" ; } %> <% warning = (String) error.get( COUNTY ) ; if( warning == null ) { warning = "" ; } %> <% warning = (String) error.get( PHONE ) ; if( warning == null ) { warning = "" ; } %> <% warning = (String) error.get( EMAIL ) ; if( warning == null ) { warning = "" ; } %>
Name: <%= realname %> <%= warning %>
Street: <%= street %> <%= warning %>
City: <%= city %> <%= warning %>
State: <%= state %> <%= warning %>
Zip: <%= zip %> <%= warning %>
County: <%= county %> <%= warning %>
Phone: <%= phone %> <%= warning %>
Email: <%= email %> <%= warning %>
Contact Preference:  


Return Home