PHP 表单向 Limbo 发送信息!

发布于 2024-07-24 01:59:31 字数 8228 浏览 3 评论 0原文

我被告知我客户的报价表并未生成太多电子邮件。 据我所知,虽然表格会将您带到确认页面,但信息永远不会到达收件人。

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

非常感谢!

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

< strong>首先是表单本身:

<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

我想知道这些如何一起工作以及可能出现什么问题。

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

呢古 2024-07-31 01:59:31

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

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.

橘虞初梦 2024-07-31 01:59:31

这是为了回答您的问题“这些如何一起工作”。

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

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

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.

兮颜 2024-07-31 01:59:31

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

From: <[email protected]>

如果您使用名字和姓氏字段,则它们需要用引号引起来:

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

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

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

<?php 

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

?>

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

?>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文