這是在LAMP服務器上。PHP郵件中的換行符(): n,\ n和 r n不工作
我在網上找到的所有答案都表明上面的其中一個應該可以工作,但我無法得到它的工作。
我的代碼是:
$to = $email_to;
$subject = 'Website Form';
$message = 'From: ' . $name .
' \r\n Date: ' . $date .
' \r\nText: ' . $text .
'\r\n Use on Presentations?: ' . $presentations .
'\r\n Use on Websites?: ' . $website .
'\r\n Use on Case Studies?: ' . $casestudy;
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
會有人知道我做了什麼錯?
不能用於標題或消息? –