dquv73115 2013-03-22 11:03
浏览 72
已采纳

PHP邮件表格 - 标记为垃圾邮件

I've built a mailer form in php that allows me to just type in an email address and it fires an email directly to the address entered, this is to save a stupid amount of time due to the fact that i've got to send thousands. The php is below:

<?php
{
$to = $_POST['contactEmail'];
$subject = "UK Exporters - Buyers of Commercial Vehicles";
$headers = "Content-type:text/html;charset=iso-8859-1";

$message = 
"
<html><head></head><body style='font-family: arial;'>      
<span style='font-weight: bold;'>To whom it may concern,</span><br /><br />

At UK Exporters, we are buyers of Scanias, Volvos, Mercedes, Renaults, DAFs.<br /> 
Runners and non-runners.<br />
4 X 2’s, 8 x 4’s, 6 x 2’s.<br /><br />

We need your old stock for export orders. Top prices paid. For export orders. If you     have any items that you believe we would be interested in purchasing then please reply and let me know. Thank you for reading this email, we hope to hear from you soon.<br /><br />

Kind regards,<br /><br />

Sam<br />
UK Exporters<br /><br />
<img src='http://uk-exporters.co.uk/emailer/card.jpg' />
</body>
</html>"
; 

mail($to, $subject, $message, $headers);
echo "Another bites the dust! :D<br /><a href='http://uk-exporters.co.uk/emailer'>Send     another</a>"?>
<?php  }
?>

I'm not a php expert, so any help would be appreciated, i've also list the reasons why it's being marked as spam:

Content analysis details:   (5.5 points, 5.0 required)

pts rule name              description
---- ---------------------- --------------------------------------------------
-0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at http://www.dnswl.org/, low
                        trust
                        [82.197.130.210 listed in list.dnswl.org]
 0.0 HTML_MESSAGE           BODY: HTML included in message
 1.8 HTML_IMAGE_ONLY_08     BODY: HTML: images with 400-800 bytes of words
 1.1 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
 1.3 RDNS_NONE              Delivered to internal network by a host with no rDNS
 2.0 MIME_HEADER_CTYPE_ONLY 'Content-Type' found without required MIME
                            headers

The email would send perfectly well, until I tried sending an image along with it, any ideas guys?

  • 写回答

1条回答 默认 最新

  • dongzhent208577 2013-03-22 11:10
    关注

    Your analysis details are clear enough. You need to make your header more suitable to your message, by adding the one below:

     #For 'Content-Type' found without required IME headers
     $headers .= "MIME-Version: 1.0" . "
    ";
    

    Also seems you missing FROM Address in header

     $headers  .= 'From: from@email.com' . "
    " .
    

    For more on mail headers do read this.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c