I have the following code:
require_once('c:\wamp64\www\phpmailer\class.phpmailer.php');
$mail = New PHPMailer();
//$mail-> ErrorInfo;
//exit;
$mail->IsSMTP = true;
//$mail-> ErrorInfo;
//exit;
$mail->SMTPSecure = "ssl";
//$mail-> ErrorInfo;
//exit;
$mail->Host = "smtp.host.com.br";
//$mail-> ErrorInfo;
//exit;
$mail->Port = 465;
//$mail-> ErrorInfo;
//exit;
$mail->Username = "[email protected]";
$mail->Password = "senha123";
//$mail-> ErrorInfo;
//exit;
$mail->From = "[email protected]";
$mail->FromName = "Suporte";
//$mail-> ErrorInfo;
//exit;
$mail->Subject = "Teste de Envio";
$html = "aa !";
$text = "aa ! ";
$mail->Body = $html;
$mail->AltBody = $text;
//$mail-> ErrorInfo;
//exit;
$mail->AddAddress("[email protected]", "suporte");
//$mail-> ErrorInfo;
//exit;
if (!$mail->Send()){
echo "Erro DNOVO !".$mail->ErrorInfo;
} else {
echo "ALELUIA DEU CERTO !";
}
It returns the following error:
Erro DNOVO !Could not instantiate mail function.