0

有人告诉我,我客户的报价单没有产生很多电子邮件。我了解到,尽管表单会将您带到确认页面,但信息永远不会到达收件人。

我已经更改了代码,因此它会发送到我的办公室电子邮件以进行测试。如果我为下面的表单元素发布代码,是否有人能够发现问题所在?

非常感谢!

链接到报价页面是http://autoglass-plus.com/quote.php

首先是表单本身:

<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>

然后它发送到“form”文件夹中名为 index.php 的文件:

<?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')
      ?>

还有formail.inc.php,testform.tpl.php,testform.tpl.text 然后是确认页面,thanks.php

我想知道这些如何协同工作以及问题可能是什么。

4

3 回答 3

1

您的表单似乎正在使用GentleSource.com 表单邮件包。我建议从头开始,在子目录中重新下载他们的源 zip 或 tar.gz 文件。然后运行他们的安装说明,测试它。然后按照您之前的表单工作方式对其进行定制。

于 2009-06-09T21:12:07.823 回答
1

这是对您的问题“这些如何协同工作”的回应。

用户在 quote.php 页面上输入信息。页面提交后,发送到form/index.php进行处理。该文件对输入的信息进行了一些检查和格式化,两种方式,一种是使用模板 testform.tpl.php 的 html 电子邮件,另一种是使用表单 testform.tpl.text 的文本电子邮件。然后将信息传递给发送电子邮件的 formmail.inc.php,然后再传递给thanks.php,后者向用户显示响应。

问题可能是什么?查看 formmail.inc.php 文件并确保它已为您的服务器和 php 安装正确配置。

于 2009-06-09T23:02:14.947 回答
0

您应该确保邮件模板 mail.tpl.txt 中的电子邮件地址格式正确。电子邮件地址应放在尖括号中:

From: <visitor@example.com>

如果您使用字段 firstname 和 lastname,则它们需要用引号引起来:

From: "{firstname} {lastname}" <vistor@example.com>

其他可能性,为什么脚本不会发送电子邮件:没有 MTA 的 Windows 服务器。邮件在途中某处被垃圾邮件过滤器捕获。

您应该测试服务器是否甚至可以发送电子邮件:

<?php 

mail('your-email@example.com', 'Test-Subject', 'Test-Message');

?>
于 2009-07-03T01:03:58.700 回答