2013-07-12 45 views

回答

2

使用PHP邮件()命令,你可以使用-f命令设置从地址的信封,并且可以包括从消息头的地址,以及像这样:

$to = "[email protected]"; 
    $from = "[email protected]"; 
    $subject = "subject"; 
    $message = "this is the message body"; 

    $headers = "From: $from"; 
    $ok = @mail($to, $subject, $message, $headers, "-f " . $from); 
+0

感谢。这很好。 – John

相关问题