您可以使用基本标题来完成此操作.
原文链接:https://www.f2er.com/php/132885.html<?PHP $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: Jack Sparrow <jsparrow@blackpearl.com>' . PHP_EOL . 'Reply-To: Jack Sparrow <jsparrow@blackpearl.com>' . PHP_EOL . 'X-Mailer: PHP/' . PHPversion(); mail($to,$subject,$message,$headers); ?>