Problemi con la posta
Ragazzi ho copiato la cartella _lib sul server....
poi ho nelle mie pagine i seguenti codici:
pagina1 =pagina invia_contatto.php=codice HTML:<form method="POST" action="invia_contatto.php"> <div class="form-group" id="contactForm"> <input type="text" class="form-control" id="Nome" name="Nome" placeholder="Nome" required/> <input type="email" class="form-control" id="Email" name="Email" placeholder="Email" required> <input type="text" class="form-control" id="Telefono" name="Telefono" placeholder="Telefono" required > <textarea class="form-control" id="Messaggio" rows="2" name="Messaggio" placeholder="Messaggio" required></textarea> </div> <div class="navbar-buttons mbr-section-btn"> <button type="submit" class="btn btn-sm btn-primary display-4"> <span class="mbri-edit mbr-iconfont mbr-iconfont-btn" style="color: rgb(8, 131, 11);"> </span>INVIA MESSAGGIO</button> </div> </form>
gli errori che mi segna sono i seguenti :Codice PHP:
<?php
require("_lib/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP$mail->Host = "smtps.aruba.it;"; // SMTP servers$mail->SMTPAuth = true; // turn on SMTP authentication$mail->Username = "info@xxxxx.it"; // SMTP username$mail->Password = "xxxxxx"; // SMTP password
$mail->From = "test@hotmail.com";$mail->FromName = "Mailer";$mail->AddAddress("test@hotmail.com","Josh Adams"); //$mail->AddAddress("test@hotmail.com"); // optional name$mail->AddReplyTo("test@hotmail.com","Information");
$mail->WordWrap = 50; // set word wrap//$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); $mail->IsHTML(true); // send as HTML
$mail->Subject = "Here is the subject";$mail->Body = "This is the <b>HTML body</b>";$mail->AltBody = "This is the text-only body";
if(!$mail->Send()){ echo "Message was not sent <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit;}
echo "Message has been sent";
//chiudiamo la connessione$messaggio->SmtpClose();unset($messaggio);?>
Warning: include_once(class.smtp.php): failed to open stream: No such file or directory in /web/htdocs/www.miosito.it/home/test/_lib/class.phpmailer.php on line 515
Warning: include_once(): Failed opening 'class.smtp.php' for inclusion (include_path='.:/php5.5/lib/php') in /web/htdocs/www.miosito.it/home/test/_lib/class.phpmailer.php on line 515
Fatal error: Class 'SMTP' not found in /web/htdocs/www.miosito.it/home/test/_lib/class.phpmailer.php on line 583
se non erro non trova il file class.smtp.php
ma dove lo trovo ???
Grazie 1000