发送邮件PHP不起作用

时间:2018-01-04 09:54:17

标签: php email

我在PHP中使用mail()构建了一个简单的php验证,邮件不会发送到邮件,而是通过邮件传输的信息。感谢帮助者。

<?php
 if ((isset($_POST['name'])) && (isset($_POST['phone']))) {

  $name = $_POST['name'];
  $phone = $_POST['phone'];

  $to = "a0524553300a@gmail.com";

  $subject = 'חום התיכון - טופס יצירת קשר ';
  $headers = "From: $email" . "\r\n";
  $headers .= "MIME-Version: 1.0" . "\r\n";
  $headers .= "Content-type: text/html; charset=utf-8";

  $replymessage = "<html>
  <head>
  <meta http-equiv='content-type' content='text/html; charset=utf-8' />
  </head>
  <body style='    direction: rtl;'>
  <div>
  <span>שם: </span>
  <span>$name</span>
  </div>
  <br/>
      <div>
  <span>טלפון: </span>
  <span>$phone</span>
  </div>
  </body>
  </html>";

  mail($to, $subject, $replymessage, $headers);

  return true;
 }
 ?>

0 个答案:

没有答案