2012-04-16 4 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= 

는 어떤 문제이며 \ 연구 \ n` 돌아-Path` 헤더 '전에'누락 그것을

+1

를 해결하는 방법, 당신은 '이 \ 연구 \ 없음 \ 연구 \ n'은'에서 이전 :'헤더 만'\ r \ n '이어야합니다. 또한 서버가 적절한 DNS 레코드 및 IP에 대한 일반 호스트 이름과 같은 대형 ISP에 메일을 보내기위한 요구 사항을 충족하는지 확인하십시오. – drew010

답변

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=