Warning: smtpsend(class.smtp.php) [function.smtpsend]: failed to open stream: No such file or directory in C:\Inetpub\vhosts\sito\httpdocs\inc\class.phpmaile r.php on line 513
Warning: smtpsend() [function.include]: Failed opening 'class.smtp.php' for inclusion (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\sito\httpdocs\inc\class.phpmaile r.php on line 513
Fatal error: Cannot instantiate non-existent class: smtp in C:\Inetpub\vhosts\sito\httpdocs\inc\class.phpmaile r.php on line 581
lo script che uso è:
include_once('inc/class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP(); // attiva l'invio tramiteSMTP
$mail->Host = "localhost"; // indirizzo smtp
$mail->From = "noreply@miaemail.it;
$mail->FromName = "Nome Cognome";
$mail->Subject = "Il terzo email con PHPmailer";
$mail->AddAddress("email@miaemail.it");
$html_body = "test";
$mail->MsgHTML($html_body);
if($mail->Send())
{
echo 'mail inviato correttamente';
}
else
{
echo 'Errore: mail non inviato';
}