邮件php在控制台上发送500

时间:2018-11-23 12:00:06

标签: php forms email

我在此页面http://cp34532-wordpress-76.tw1.ru/?dt_courses=professionalnyj-microsoft-office-excel上有表格

当我插入所有数据时,然后单击“提交”,以提醒我有关已保存文件的信息。

,控制台错误500

这是代码:

<?php

  if(!$_POST) exit;

  $to     = $_POST['hid_adminemail']; #Replace your email id...
  $dtfullname   = utf8_decode(urldecode($_POST['dtfullname']));
  $dtemail    = $_POST['dtemail'];
  $dtcourse    = utf8_decode(urldecode($_POST['dtcourse']));
  $subject  = $_POST['hid_subject'];
  $dtdatetimepicker  = isset($_POST['dtdatetimepicker']) ? $_POST['dtdatetimepicker'] : '';

  if($dtfullname == '' || $dtemail == '') :   
    echo "<span class='error-msg'>".__('Заполните поля', 'lms')."</span>";
    exit;
  endif;

  $e_subject = $subject;

  $msg  = $dtfullname. ' has been subscribed for '.$dtcourse.'\r\n\n';
  if($dtdatetimepicker != '')
    $msg  .= 'He/She planned to visit in person on '.$dtdatetimepicker.'\r\n\n';
  $msg .= "You can contact $dtfullname via email, $dtemail.\r\n\n";
  $msg .= "-------------------------------------------------------------------------------------------\r\n";

  if(wp_mail($to, $e_subject, $msg, "From: $dtemail\r\nReturn-Path: $dtemail\r\n"))
  {
    echo "<span class='success-msg'>".$_POST['hid_successmsg']."</span>";
  }
  else
  {
    echo "<span class='error-msg'>".$_POST['hid_errormsg']."</span>";
  }

?>

那么您能给您报价哪里有问题

再次检查托管是否正常。

0 个答案:

没有答案