최근 Plesk Parallel Linux Server로 업그레이드했으며 PHP 설정이 헤더를 무시하는 것처럼 보입니다! 전자 메일은 정상적으로 수신되지만 은 HTML 태그를 표시합니다. https://www.pressgofer.com/phpInfo.phpPHP mail() HTML을 표시하지 않습니다
PHP의 자체는 괜찮을해야하지만, 어쨌든 여기에 포함했다 :
phpInfo()
파일은 여기에서 볼 수 있습니다.
PHP 메일 코드
$email = "[email protected]";
$message = "<h1 style='font-family:Helvetica,Arial;font-size:17px'>Your account has a password reset request</h1>";
$headers = "From: [email protected] \r\n";
$headers .= "Reply-To: [email protected] \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
mail($email, "Reset password notification", $message, $headers);
많은 감사, 닉
메시지 앞에'mime'과'content-type'을 사용해보십시오. –
phpinfo가 mail.add_x_header가 OFF임을 보여줍니다. 당신은 그것을 켜야합니다. –
@Renku는 아무런 차이가 없다. 두 변수는 동시에 mail() 함수에 전달된다. 그래도 고마워. –