所以我有一个发送电子邮件的脚本,它适用于我的 VPS 上的一个域,但不适用于另一个域,这非常令人困惑!我已经检查了所有 smtp 详细信息...等。并且看不出任何原因。该脚本运行起来就好像它是成功的并且没有抛出任何错误并且变量都已就位。
如果有人有任何想法,将不胜感激!
<?php
$email=$_POST['email'];
$name=$_POST['name'];
$business=$_POST['business'];
$town=$_POST['town'];
$phone=$_POST['phone'];
$rpo=str_replace("rpo", "RPO",$_POST['rpo']);
$retained=str_replace("retained", "Retained",$_POST['retained']);
$ats=str_replace("ats", "ATS",$_POST['ats']);
$interest=$rpo . ' ' . $retained . ' ' . $ats;
$interest=str_replace('','<br>',$interest);
$msg = "You've received a new enquiry from $name at $business<br>
They are based in $town and interested in:<br>
$interest<br>
You can contact them on:<br>
<b>Phone: </b>$phone<br>
<b>Email: </b>$email<br>
This is an automatically generated email from the company website generated from http://example.com";
$msg = wordwrap($msg,70);
mail('example@example.com','New Enquiry',$msg);
header("location:http://example.com");
?>
Run Code Online (Sandbox Code Playgroud) 我在这里真的很傻吗?
我已经完全独立地测试了这一行,并且文本不是粗体?
<td style="font-weight:bold">example</td>
Run Code Online (Sandbox Code Playgroud)
这当然应该有效吗?我已经在我的服务器和两个 HTML 模拟器上对此进行了测试。我错过了一些明显的东西吗?