如何用php设置“Return-Path”?
我尝试了什么
$subject = "title \"" . $row['title'] . "\"";
$headers = "From: test <no_replay@test.com>\r\n";
$headers .= "Return-Path: no_replay@test.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
mail($email,$subject,$addletter,$headers);
从gmail源代码我看到Return-Path: <apache@localhost.localdomain>
答案 0 :(得分:4)
对于Windows Return-Path:应该有效。在Linux上,您必须使用 -f sendmail选项。更多信息可以在http://php.net/manual/en/function.mail.php
找到mail($email,$subject,$addletter,$headers, "-fno_replay@test.com");