From:
只是另一个邮件头。您需要将其与当前$headers
并将其作为一个参数传递给mail()
:
$headers = "From: $sender <$senderEmail>\\r\\n";
$headers .= "MIME-Version: 1.0\\r\\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\\r\\n";
// la de da
mail( $recipient, $subject, $mailBody, $headers );