SMTP错误:无法进行身份验证

i am trying to use phpMailer to send confirmation messages to users via email. my code is this:

$SMTP_USERNAME = SMTP_USERNAME;
$SMTP_PASSWORD = SMTP_PASSWORD;
$SMTP_HOST = SMTP_HOST;
$SMTP_STATUS = SMTP_STATUS; 

    if($SMTP_STATUS==1)
    {

        include($_SERVER['DOCUMENT_ROOT']."/modules/SMTP/smtp.php"); //mail send thru smtp
    }
    else
    {
        // To send HTML mail, the Content-type header must be set
        $headers  = 'MIME-Version: 1.0' . "
";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
        // Additional headers
        $headers .= 'From: '.$from.'' . "
";
        $headers .= 'Bcc: '.$to.'' . "
";
        mail($from,$subject,$message,$headers); 
    }

but every time I load it, it displays this

Error msg: " SMTP Error: Could not authenticate.

Please help me out from these issue.

Thanks for your time guys, hope someone can get back to me soon!

The mail() function does not allow any kind of authentication. You need to switch to a third-party mail package that implements the required SMTP authentication (or write you own, which I wouldn't recommend). Typical choices include: