Ciao a tutti...
ho un problema con l' invio delle e-mail con la classe PHP MAILER.
l' errore è il seguente
codice:
Warning: include_once(class.smtp.php): failed to open stream: No such file or directory in C:\xampp\htdocs\PROGETTO_LOGIN_REGISTRAZIONE\class.phpmailer.php on line 513
Warning: include_once(): Failed opening 'class.smtp.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\PROGETTO_LOGIN_REGISTRAZIONE\class.phpmailer.php on line 513
Fatal error: Class 'SMTP' not found in C:\xampp\htdocs\PROGETTO_LOGIN_REGISTRAZIONE\class.phpmailer.php on line 581
questo succede solamente se inserisco le 2 righe per il controllo dell'SMTP anche perche senno non puo inviare.
il codice è :
codice:
<?php
require('class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP(); // diciamo alla classe di usare SMTP
$mail->Host = "out.alice.it"; // SMTP server, questo valore è da modificare!
$mail->From = "from@example.com"; // L'account email che state utilizzando
$mail->AddAddress("emiliano.prelle@.libero.it"); // L'indirizzo email di destinazione
$mail->Subject = "First PHPMailer Message"; // L'oggetto della email
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer."; // Il corpo del messaggio
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
echo 'REGISTRAZIONE COMPLETATA CON SUCCESSO!!!!';
Echo "<a href=form.php> vai alla home page per loggarti</a>";
?>