用PHP mail()发MINI邮件时,用hotmail邮箱在WEB页接收时,能看到附件存在,但附件大小为0KB,不能打开下载。而相同的邮件在Gmail和Yahoo的邮箱能正常接收,且用Dreammail客户端接收Hotmail邮件时,附件就能能正常打开、下载附件,请大侠指点一二。急
下面是我邮件的header和body
=================header==================================================
From: xxxxx <[email protected]>
Reply-To: jfisher <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/mixed;
 boundary="--c8942792b23e12c8b4286b90ef69e235"
Content-Transfer-Encoding: 7bit
==============body============================================
This is a multi-part message in MIME format.----c8942792b23e12c8b4286b90ef69e235
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 7bitxxxxxxxx.<br><b>Note:</b>60
<br><br><br><center><a href='www.constructhub.com'><img src="https://xxxx.com/images/xxx.jpg" title='xxxxx'></a></center>----c8942792b23e12c8b4286b90ef69e235
Content-type: application/pdf;
name="COR#1104-7.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
  filename="COR#1104-7.pdf"<.....base64 encoded doc (pedigree.doc) of Bucephalus...> 
----c8942792b23e12c8b4286b90ef69e235--

解决方案 »

  1.   

    楼主,能不能分享一下你的mail()的代码,以及设置啊,我这根本就发不了,谢谢了楼主!
      

  2.   

    runffer_yang:你的方法我试过,不过结果也是能看到附件存在,但附件大小为0KB,不能打开下载。Content-Disposition: attachment;应该是只作为附件接收,Content-Disposition: inline;是可以在正文中打开。对我这个问题,貌似是没有影响。
      

  3.   

    搞定了 = =
    hotmail比较挑剔,必须要在header里加上
    "To: ".$receiver_name." <".$receiver_email.">\r\n"
    加在From后面
    然后就可以了