Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/251.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
标记为垃圾邮件的PHP联系人表单_Php_Html_Mime_Contact Form_Spam Prevention - Fatal编程技术网

标记为垃圾邮件的PHP联系人表单

标记为垃圾邮件的PHP联系人表单,php,html,mime,contact-form,spam-prevention,Php,Html,Mime,Contact Form,Spam Prevention,我真的需要你的帮助。我已经写了下面的电子邮件表单,它与我自己的私人域电子邮件地址一起工作(me@my-domain.co.uk),但公司的电子邮件地址(me@work.com)必须有一个更强的垃圾邮件过滤器,因为没有通过。我现在希望通过组织不同的MIME类型来降低垃圾邮件级别,例如,在客户端的text/html和text/plain。我已经阅读了以下教程: 问题是它毫无意义。是否有人能为我指出正确的方向来纠正问题,并告诉我如何对单独的标题进行排序等 <?php { $to = "m

我真的需要你的帮助。我已经写了下面的电子邮件表单,它与我自己的私人域电子邮件地址一起工作(me@my-domain.co.uk),但公司的电子邮件地址(me@work.com)必须有一个更强的垃圾邮件过滤器,因为没有通过。我现在希望通过组织不同的MIME类型来降低垃圾邮件级别,例如,在客户端的text/html和text/plain。我已经阅读了以下教程:

问题是它毫无意义。是否有人能为我指出正确的方向来纠正问题,并告诉我如何对单独的标题进行排序等

<?php
  {
  $to = "me@work.com, me@my-domain.co.uk";
  $subject = "Quotation Request from Work Website.";
  $headers = "Content-type:text/html;charset=iso-8859-1";
  $first_name = filter_input(INPUT_POST, 'first_name');
  $last_name = filter_input(INPUT_POST, 'last_name');
  $telephone = filter_input(INPUT_POST, 'telephone');
  $gotNumberFrom = filter_input(INPUT_POST, 'gotNumberFrom');
  $quoteFor = filter_input(INPUT_POST, 'quoteFor');
  $address = filter_input(INPUT_POST, 'address');
  $takenBy = filter_input(INPUT_POST, 'takenBy');

  $message = 
  "<span style='font-weight: bold;'>Name: </span>"."<br />".$first_name." ".$last_name."<br />"."<br />".
  "<span style='font-weight: bold;'>Telephone: </span>"."<br />".$telephone."<br />"."<br />".
  "<span style='font-weight: bold;'>Address of Works: </span>"."<br />".$address."<br />"."<br />".
  "<span style='font-weight: bold;'>Quotation for: </span>"."<br />".$quoteFor."<br />"."<br />".
  "<span style='font-weight: bold;'>Got our number from: </span>"."<br />".$gotNumberFrom."<br />"."<br />".
  "<span style='font-weight: bold;'>Quotation taken by: </span>"."<br />".$takenBy."<br />"; 

  mail($to, $subject,"<html>Hola!<br /> Please find details below of the individual that has requested a quotation Gaffer.<br />
      <br />" . $message . "</html>", $headers);
  echo "Your message has been successfully sent, here's a lollipop. <br />"?>
<?php  }
?>

问题背后的主要原因是不正确的邮件头,将正确的邮件头传递到邮件功能中,您就可以开始了。您可以使用以下示例:

$headers  = "From: My site<noreply@example.com>\r\n";
$headers .= "Reply-To: info@example.com\r\n";
$headers .= "Return-Path: info@example.com\r\n";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers=“From:My-site\r\n”;
$headers.=“回复:info@example.com\r\n“;
$headers.=“返回路径:info@example.com\r\n“;
$headers=“MIME版本:1.0\r\n”;
$headers.=“内容类型:text/html;字符集=ISO-8859-1\r\n”;

问题背后的主要原因是不正确的标题,将正确的标题传递到邮件功能中,您就可以开始了。您可以使用以下示例:

$headers  = "From: My site<noreply@example.com>\r\n";
$headers .= "Reply-To: info@example.com\r\n";
$headers .= "Return-Path: info@example.com\r\n";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers=“From:My-site\r\n”;
$headers.=“回复:info@example.com\r\n“;
$headers.=“返回路径:info@example.com\r\n“;
$headers=“MIME版本:1.0\r\n”;
$headers.=“内容类型:text/html;字符集=ISO-8859-1\r\n”;

问题背后的主要原因是不正确的标题,将正确的标题传递到邮件功能中,您就可以开始了。您可以使用以下示例:

$headers  = "From: My site<noreply@example.com>\r\n";
$headers .= "Reply-To: info@example.com\r\n";
$headers .= "Return-Path: info@example.com\r\n";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers=“From:My-site\r\n”;
$headers.=“回复:info@example.com\r\n“;
$headers.=“返回路径:info@example.com\r\n“;
$headers=“MIME版本:1.0\r\n”;
$headers.=“内容类型:text/html;字符集=ISO-8859-1\r\n”;

问题背后的主要原因是不正确的标题,将正确的标题传递到邮件功能中,您就可以开始了。您可以使用以下示例:

$headers  = "From: My site<noreply@example.com>\r\n";
$headers .= "Reply-To: info@example.com\r\n";
$headers .= "Return-Path: info@example.com\r\n";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers=“From:My-site\r\n”;
$headers.=“回复:info@example.com\r\n“;
$headers.=“返回路径:info@example.com\r\n“;
$headers=“MIME版本:1.0\r\n”;
$headers.=“内容类型:text/html;字符集=ISO-8859-1\r\n”;

在邮件功能中发送正确的标题在邮件功能中发送正确的标题在邮件功能中发送正确的标题在邮件功能中发送正确的标题在邮件功能中发送正确的标题非常简单!这允许电子邮件进入我的工作地址,但是,电子邮件仍然没有呈现邮件中的HTML,只是粘贴为纯文本,显示电子邮件中的所有HTML元素。太棒了!这允许电子邮件进入我的工作地址,但是,电子邮件仍然没有呈现邮件中的HTML,只是粘贴为纯文本,显示电子邮件中的所有HTML元素。太棒了!这允许电子邮件进入我的工作地址,但是,电子邮件仍然没有呈现邮件中的HTML,只是粘贴为纯文本,显示电子邮件中的所有HTML元素。太棒了!这允许电子邮件进入我的工作地址,但是,电子邮件仍然没有呈现邮件中的HTML,只是粘贴为纯文本,显示电子邮件中的所有HTML元素。