以下PHP发送邮件功能在Firefox中可以使用,但不再适用于至少一个版本的Internet Explorer(10.0.5)。我不确定这是什么时候发生的,但似乎与IE或我们的主机迁移准备4到5.2 PHP的某种形式的变化有关。请注意,即使在PHP 5.4环境下,该功能在Firefox中也能正常工作。
受影响的功能如下,任何帮助都将非常感激(注意删除样式项以使代码更容易查看/调试):
<?php
$comments=nl2br($comments);
$date=date("F d,Y h:i:s a");
$body=" <table width='650' align='left' cellspacing='0' cellpadding='0' style=' background-color:#FFFFFF; margin-bottom:10px;'>
<tr><td colspan='2' style='text-align:left; background-color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000000; font-weight:bold; padding:5px;'>Quote Request: <span style='font-size:11px; color:#000000; font-weight:normal;'>Submitted ".$date." </span><hr></td>
</tr>
<tr>
<td>Name:</td>
<td>".$_REQUEST['name']."</td>
</tr>
<tr>
<td>Company:</td>
<td>".$_REQUEST['company']."</td>
</tr>
<tr>
<td>Title:</td>
<td>".$_REQUEST['title']."</td>
</tr>
<tr>
<td>Phone #:</td>
<td>".$_REQUEST['phone']."</td>
</tr>
<tr>
<td>Email:</td>
<td>".$_REQUEST['email']."</td>
</tr>
<tr>
<td>Product or service type:</td>
<td>".$_REQUEST['product']."</td>
</tr>
<tr>
<td>Description of the product or service:</td>
<td>".$_REQUEST['description']."</td>
</tr>
<tr>
<td>Project type:</td>
<td>".$_REQUEST['product_type']."</td>
</tr>
<tr>
<td>Project overview:</td>
<td>".$_REQUEST['overview']."</td>
</tr>
<tr>
<td>Please summarize project's objectives:</td>
<td>".$_REQUEST['summarize']."</td>
</tr>
<tr>
<td># of users to test (if applicable):</td>
<td>".$_REQUEST['user_test']."</td>
</tr>
<tr>
<td>Supported computing platforms (if applicable):</td>
<td>".$_REQUEST['supported_computing']."</td>
</tr>
<tr>
<td>Project depth required:</td>
<td>".$_REQUEST['depth']."</td>
</tr>
<tr>
<td>Project's status:</td>
<td>".$_REQUEST['project_status']."</td>
</tr>
<tr>
<td>When would you like to begin?</td>
<td>".$_REQUEST['like_begin']."</td>
</tr>
<tr>
<td>When will you need the results?</td>
<td>".$_REQUEST['result']."</td>
</tr>
<tr>
<td>How should we contact you?</td>
<td>".$_REQUEST['Contact']."</td>
</tr>
</table>";
if($_POST['email']!="")
{
$body =$body;
$subject="Quote Request";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: " .$_REQUEST['email']. "\r\n";
$to="details@ourURL.com";
// $to="";
mail($to,$subject,$body,$headers);