您可以为此指定第四个header参数:
$xheaders = ""; $xheaders .= "From: <$from>\n"; $xheaders .= "X-Sender: <$from>\n"; $xheaders .= "X-Mailer: PHP\n"; // mailer $xheaders .= "X-Priority: 1\n"; //1 Urgent Message,3 Normal $xheaders .= "Content-Type:text/html; charset=\"iso-8859-1\"\n"; $xheaders .= "Bcc:email@example.com"\n"; $xheaders .= "Cc:email2@example.com\n"; //....... mail($to,$subject,$msg,$xheaders);
在$to字段中,您可以指定您的电子邮件或任何您喜欢的.