2012-04-16 62 views
-3

我需要知道为什么在收件箱中未发送我的电子邮件,并不会附着文件PHP:发送失败(“错误的标题和邮件内容”)

这里是我的头和消息

MIME-Version: 1.0; \r\nContent-Type: multipart/mixed; boundary="PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS";Return-Path:[email protected];\r\nOrganization: Shbkat.com;\r\n\r\n From: [email protected]; \r\nBcc : [email protected] \r\n 

消息

\n --PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS \r\n Content-Type:text/html;\r\n Content-Transfer-Encoding: 7bit \n\n I Love Egypt\r\n\r\n --PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS \r\n Content-Type: application/octet-stream; name="file.txt" ; \r\n Content-Description: file.txt; \r\n Content-Disposition: attachment;filename=file.txt; size=38; \r\n Content-Transfer-Encoding: base64 \n\ndGhpcyBpcyBhdHRhY2hlZCBmaWxlIGluIG1haWwgZnVuY3Rpb24= 

是什么问题以及如何解决它

+1

缺少'\ r \ N'前'返回-Path'头,你有'\ r \ n \ r \ N'前'从:'标题时它应该只是'\ r \ n'。另外,请确保您的服务器符合向大型ISP发送邮件的要求,例如正确的DNS记录和IP的非通用主机名。 – drew010 2012-04-16 23:27:34

回答

0
MIME-Version: 1.0; \r\n 
Content-Type: multipart/mixed;boundary="PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS";\r\n 
Return-Path:[email protected];\r\n 
Organization: Shbkat.com;\r\n 
From: [email protected]; \r\n 
Bcc: [email protected] \r\n 

\n --PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS \r\n 
Content-Type:text/html;\r\n 
Content-Transfer-Encoding: 7bit \n\n I Love Egypt\r\n\r\n --PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS \r\n 
Content-Type: application/octet-stream; name="file.txt"; \r\n 
Content-Description: file.txt; \r\n 
Content-Disposition: attachment;filename=file.txt; size=38; \r\n 
Content-Transfer-Encoding: base64 \n\ndGhpcyBpcyBhdHRhY2hlZCBmaWxlIGluIG1haWwgZnVuY3Rpb24=