douduan9129 2013-12-10 20:36
浏览 49

PHP Mailer缓慢发送消息

(Please be patient with me, PHP wasn't in the job description when I signed on to this job.) (I'm also not responsible for the tables in the HTML.)

Based on the email I got, the "issue" that the php mailer is having, is that it takes about 20 minutes to receive an email after initially submitting the form.

duramatic.com

Here's my tutorial-written code:

<?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
"; // This takes the email and displays it as who this email is from.
$headers .= "Content-type: text/html
"; // 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>

And here's where this is referenced in HTML:

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

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 西门子S7-Graph,S7-300,梯形图
    • ¥50 用易语言http 访问不了网页
    • ¥50 safari浏览器fetch提交数据后数据丢失问题
    • ¥15 matlab不知道怎么改,求解答!!
    • ¥15 永磁直线电机的电流环pi调不出来
    • ¥15 用stata实现聚类的代码
    • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
    • ¥20 docker里部署springboot项目,访问不到扬声器
    • ¥15 netty整合springboot之后自动重连失效
    • ¥15 悬赏!微信开发者工具报错,求帮改