나는 항상이 기능을 사용이며, 나는이 질문에 대한 답 아니라는 것을 알고
function sendHTMLemail($HTML,$from,$to,$subject,$fromname)
{
$headers = "From: ".$fromname." <".$from.">\r\n";
$headers.= "Reply-To: ".$fromname." <".$from.">\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$boundary = uniqid("HTMLEMAIL");
// First we be nice and send a non-html version of our email
$headers .= "Content-Type: multipart/alternative;".
"boundary = $boundary\r\n\r\n";
$headers .= "This is a MIME encoded message.\r\n\r\n";
$headers .= "--$boundary\r\n".
"Content-Type: text/plain; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode(strip_tags($HTML)));
// Now we attach the HTML version
$headers .= "--$boundary\r\n".
"Content-Type: text/html; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode($HTML));
// And then send the email ....
mail($to,$subject,"",$headers);
}
클라이언트가 일반 텍스트가 아닌 HTML로 표시되는지 확인 했습니까? – Menztrual
선택했는데 이것에 대한 옵션을 찾을 수 없습니다.받은 편지함의 메시지 헤더입니다. Content-Type : text/html; charset = UTF-8 올린 사람 : premieregypt.com <[email protected]> 회신 메일 : me <[email protected]> 메시지 ID : <[email protected]> 날짜 : 2012 년 5 월 16 일 수요일 12:19:02 +0200 (중부 표준시) –
다른 HTML 기반 전자 메일이 Outlook에 올바르게 표시됩니까? – vimist