views:

140

answers:

3

I was told my client's quote form has not been generating very many emails. I have learned that although the form brings you to a confirmation page, the information never reaches the recipient.

I have altered the code so it goes to my office email for testing purposes. If I post code for the form elements below, would someone be able to spot what the problem might be?

Thank you very much!

Link to the quote page is http://autoglass-plus.com/quote.php

First is the form itself:

<form id="quoteForm" name="form" action="form/index.php" method="post">
  <fieldset>
  <p> <strong>Contact Information:</strong><br />
  </p>
    <div>
    <label for="firstname">First Name:<br />
    </label>
    <input type="text" size="30" name="firstname" class="txt" id="firstname" />
  </div>
    <div>
    <label for="lastname">Last Name:<br />
    </label>
    <input type="text" size="30" name="lastname" class="txt" id="lastname" />
  </div>
    <div>
    <label for="address">Address:<br />
    </label>
    <input type="text" size="30" name="address" class="txt" id="address" />
  </div>
    <div>
    <label for="city">City:<br />
    </label>
    <input type="text" size="30" name="city" class="txt" id="city" />
  </div>
    <div>
    <label for="state">State:<br />
    </label>
    <input type="text" size="30" name="state" class="txt" id="state" />
  </div>
    <div>
    <label for="zip">Zip:<br />
    </label>
    <input type="text" size="30" name="zip" class="txt" id="zip" />
  </div>
    <div>
    <label for="label">Phone:<br />
    </label>
    <input type="text" size="30" name="phone" class="txt" id="label" />
  </div>
    <div>
    <label for="email">Email:<br />
    </label>
    <input type="text" size="30" name="email" class="txt" id="email" />
  </div>
    <p><br />
        <b>Insurace Information</b></p>
    <p><i>Auto Glass Plus in an Approved Insurance Vendor. Insurance claims require additional information that we will request when we contact you for your quote.</i></p>
    <br />
  <div>
    <input type="checkbox" name="insurance" value="yes" />
    Check here if this is an insurance claim.<br />
    <label for="year">Insurance Provider:<br />
    </label>
    <input type="text" size="30" name="provider" class="txt" id="provider" />
  </div>
    <p><br />
      <b>Vehicle Information:</b><br />
  </p>
    <div>
    <label for="year">Vehicle Year :<br />
    </label>
    <input type="text" size="30" name="year" class="txt" id="year" />
  </div>
    <div>
    <label for="make">Make: </label>
    <br />
    <input type="text" size="30" name="make" class="txt" id="make" />
  </div>
    <div>
    <label for="model">Model:</label>
    <br />
    <input type="text" size="30" name="model" class="txt" id="model" />
  </div>
    <div>
    <label for="body">Body Type:<br />
    </label>
    <select name="body" id="body">
      <option>Select One</option>
      <option value="2 Door Hatchback">2 Door Hatchback</option>
      <option value="4 Door Hatchback">4 Door Hatchback</option>
      <option value="2 Door Sedan">2 Door Sedan</option>
      <option value="4 Door Sedan">4 Door Sedan</option>
      <option value="Station Wagon">Station Wagon</option>
      <option value="Van">Van</option>
      <option value="Sport Utility">Sport Utility</option>
      <option value="Pickup Truck">Pickup Truck</option>
      <option value="Other Truck">Other Truck</option>
      <option value="Recreational Vehicle">Recreational Vehicle</option>
      <option value="Other">Other</option>
    </select>
  </div>
    <p><b><br />
      Glass in Need of Repair:</b><br />
  </p>
    <div>
    <input type="checkbox" name="repairs" value="Windshield" />
      Windshield<br />
      <input type="checkbox" name="repairs" value="Back Glass" />
      Back Glass<br />
      <input type="checkbox" name="repairs" value="Driver&rsquo;s Side Window" />
      Side Window*<br />
      <input type="checkbox" name="repairs" value="Chip Repair" />
      Chip Repair<br />
      <input type="checkbox" name="repairs" value="Other" />
      Other </div>
    <p><strong>*Important:</strong> For side glass, please indicate the specific window that needs replacement <i>(e.g. passenger side rear door or driver side vent glass)</i>, and any tinting color preference in the <strong>Describe Damage </strong> field.</p>
    <p><br />
      <b>Describe Damage</b></p>
    <div>
    <textarea rows="6" name="damage" id="damage" cols="37" class="txt"></textarea>
  </div>
    <input type="hidden" name="thanks" value="../thanks.php" />
  <input type="hidden" name="required_fields" value="firstname, lastname, email, phone" />
  <input type="hidden" name="html_template" value="testform.tpl.html" />
  <input type="hidden" name="mail_template" value="testmail.tpl.txt" />
  <div class="submit">
    <center>
      <input type="submit" value="Submit Form" name="Submit" id="Submit" />
    </center>
  </div>
  </fieldset>
</form>

Then it sends to a file named index.php inside the "form" folder:

<?php

      $script_root           = './';

      $referring_server      = 'www.wmsgroup.com, wmsgroup.com, scripts';
      $allow_empty_referer   = 'yes';     // (yes, no)

      $language              = 'en';      // (see folder 'languages')

      $ip_banlist            = '';

      $ip_address_count      = '0';
      $ip_address_duration   = '48';

      $show_limit_errors     = 'yes';    // (yes, no)

      $log_messages          = 'no';     // (yes, no)

      $text_wrap             = '65';

      $show_error_messages   = 'yes';

      $attachment            = 'no';    // (yes, no)
      $attachment_files      = 'jpg, gif,png, zip, txt, pdf, doc, ppt, tif, bmp, mdb, xls, txt';
      $attachment_size       =  100000;  

      $path['logfile']       = $script_root . 'logfile/logfile.txt'; 
      $path['upload']        = $script_root . 'upload/'; // chmod 777 upload
      $path['templates']     = $script_root . 'templates/';

      $file['default_html']  = 'testform.tpl.html';
      $file['default_mail']  = 'testmail.tpl.txt';

      /*****************************************************
      ** Add further words, text, variables and stuff
      ** that you want to appear in the templates here.
      ** The values are displayed in the HTML output and
      ** the e-mail.
      *****************************************************/
      $add_text = array(

                          'txt_additional' => 'Additional', //  {txt_additional}
                          'txt_more'       => 'More'        //  {txt_more}

                        );


      /*****************************************************
      ** Do not edit below this line - Ende der Einstellungen
      *****************************************************/  

      /*****************************************************
      ** Send safety signal to included files
      *****************************************************/
      define('IN_SCRIPT', 'true');

      /*****************************************************
      ** Load formmail script code
      *****************************************************/
      include($script_root . 'inc/formmail.inc.php')
      ?>

There is also formail.inc.php, testform.tpl.php, testform.tpl.text and then the confirmation page, thanks.php

I want to know how these all work together and what the problem could be.

A: 

Your form appears to be using the GentleSource.com Form Mail package. I suggest starting from scratch with a fresh download of their source zip or tar.gz files in a subdirectory. Then run through their installation instructions, test it. Then get it customized in the way your prior form worked.

artlung
A: 

This is in response to your question "how these all work together".

The user enters information on quote.php page. When the page is submitted, it is sent to form/index.php for processing. This file does some checks and formats the information entered two ways, one way for html email using the template testform.tpl.php and a second way for text email using the form testform.tpl.text. The information is then passed to formmail.inc.php which sends the email and then to thanks.php which displays the response to the user.

What the problem could be? Look at the formmail.inc.php file and make sure that it is properly configured for your server and php installation.

Michelle
A: 

You should make sure that the e-mail addresses in the mail template mail.tpl.txt have the correct format. E-mail addresses should be in angle brackets:

From: <[email protected]>

If you're using the fields firstname and lastname, they need to be in quotes:

From: "{firstname} {lastname}" <[email protected]>

Other possibilities, why the script won't send e-mails: Windows server with no MTA. Mails get caught by a spam filter somewhere on the way.

You should test if the server can even send e-mails:

<?php 

mail('[email protected]', 'Test-Subject', 'Test-Message');

?>
Basher