PHP Mailer缓慢发送消息

时间:2013-12-10 20:36:10

标签: php html

(请耐心等待,当我签署此职位时,PHP不在工作描述中。) (我也不对HTML中的表格负责。)

根据我收到的电子邮件,php邮件的“问题”是,在最初提交表单后收到电子邮件大约需要20分钟。

duramatic.com

这是我编写的教程代码:

<?php

/* These are the variable that tell the subject of the email and where the email will be     sent.*/

$emailSubject = 'Quote Request';
$mailto = 'sales@duramatic.com';

/* These will gather what the user has typed into the fieled. */

$nameField = $_POST['name'];
$titleField= $_POST['title'];
$companyField = $_POST['company'];
$phoneField = $_POST['phone'];
$emailField = $_POST['email'];
$commentsField = $_POST['comments'];

/* This takes the information and lines it up the way you want it to be sent in the email. */

$body = <<<EOD
<br><hr><br>
Name: $nameField <br>
Title: $titleField <br>
Company: $companyField <br>
Phone: $phoneField <br>
Email: $emailField <br>
Comments: $commentsField <br>
EOD;

$headers = "From: $email\r\n"; // This takes the email and displays it as who this email is from.
$headers .= "Content-type: text/html\r\n"; // This tells the server to turn the coding into the text.
$success = mail($mailto, $emailSubject, $body, $headers); // This tells the server what to send.
/* REsults */

$theResults = <<<EOD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


<head>

这是HTML中引用的地方:

<form name="form1" method="post" action="form_mailer.php" ><table class="quote">                      <tr>

0 个答案:

没有答案