$MailHeader= "Return-Path: ".$senderEmail."\nFrom:".$senderEmail."\nMime-Version:1.0\nContent-Type: text/html;\n";
$subject="标题";
$message="正文";
$recieverEmail="[email protected]";
mail($recieverEmail,$subject,$message,$MailHeader);

解决方案 »

  1.   

    mail
    寄出电子邮件。语法: boolean mail(string to, string subject, string message, string [additional_headers]);返回值: 布尔值函数种类: 网络系统
     
     
    内容说明 
    本函数寄出电子邮件到指定的邮件地址 to,subject 表示主题,message 为信件内容。额外的选项 additional_headers 可省略,表示其它的邮件文件头。
     
     
    使用范例 
    <?
    $message="abcdefghijklmnopqrstuvwxyz";
    mail("[email protected]", "没有主题", $message, "From: [email protected]\nReply-To: [email protected]\nX-Mailer: PHP/" . phpversion());
    ?> 
      

  2.   

    Example 1. Sending mail.mail("[email protected]", "My Subject", "Line 1\nLine 2\nLine 3");
     
    Example 2. Sending mail with extra headers.mail("[email protected]", "the subject", $message,
         "From: webmaster@$SERVER_NAME\r\n"
        ."Reply-To: webmaster@$SERVER_NAME\r\n"
        ."X-Mailer: PHP/" . phpversion());Example 3.
    <?
    $message="abcdefghijklmnopqrstuvwxyz";
    mail("[email protected]", "没有主题", $message, "From: [email protected]\nReply-To: [email protected]\nX-Mailer: PHP/" . phpversion());
    ?>