php:失败的电子邮件(“错误的标题和邮件内容”)

php:失败的电子邮件(“错误的标题和邮件内容”),php,email,sendmail,email-headers,Php,Email,Sendmail,Email Headers,我需要知道为什么我的电子邮件没有发送到收件箱,无法附加文件 这是我的标题和信息 标题 MIME-Version: 1.0; \r\nContent-Type: multipart/mixed; boundary="PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS";Return-Path:mx@mozhl.com;\r\nOrganization: Shbkat.com;\r\n\r\n From: mx@shbkat.com; \r\nBcc : samarlover

我需要知道为什么我的电子邮件没有发送到收件箱,无法附加文件

这是我的标题和信息

标题

MIME-Version: 1.0; \r\nContent-Type: multipart/mixed; boundary="PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS";Return-Path:mx@mozhl.com;\r\nOrganization: Shbkat.com;\r\n\r\n From: mx@shbkat.com; \r\nBcc : samarlover.php@gmail.com \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=

问题是什么,以及如何修复它在
返回路径
头之前缺少
\r\n
,并且您在
\r\n\r\n
前有
\r\n
From:
头,而它应该是
\r\n
。还要确保您的服务器满足向大型ISP发送邮件的要求,例如正确的DNS记录和IP的非通用主机名。
MIME-Version: 1.0; \r\n
Content-Type: multipart/mixed;boundary="PHP-mixed-MIME_BOUNDARY_MESSAGE_PARTS";\r\n
Return-Path:mx@mozhl.com;\r\n
Organization: Shbkat.com;\r\n 
From: mx@shbkat.com; \r\n
Bcc: samarlover.php@gmail.com \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=