Syntax error, unexpected T_SL

后端 未结 6 2805
北海茫月
北海茫月 2021-02-20 08:34

I\'m fairly new to php and I\'m using a script that creates a function called the \"mime_mailer\" which essentially allows me to use PHP to send emails that are able to be desig

6条回答
  •  情话喂你
    2021-02-20 09:08

    There is a bug in function_mime_mailer.php:

    if(empty($headers)){
       $headers = "MIME-Version: 1.0\n";
    }else{
       $headers.= "\nMIME-Version: 1.0\n";
    }
    

    should be

    if(empty($headers)){
       $headers = "MIME-Version: 1.0\r\n";
    }else{
       $headers.= "\r\nMIME-Version: 1.0\r\n";
    }
    

    also, if you include the MIME-Version header, then the function will include it once more - effectively having two of them.

提交回复
热议问题