Quote Originariamente inviata da satifal Visualizza il messaggio
Nel pacchetto phpmailer insieme al file "class.phpmailer.php" vi sono anche i file "class.pop3.php" e "class.smtp.php" li hai copiati tutti e tre?
I fine sono tutti e 3 nella cartella phpmailer, che è diversa da quella del form. Ho fatto una modifica al codice:

codice:
<?PHP
  require(“class.phpmailer.php”);
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host     = "ssl://smtp.gmail.com"; // SMTP server
$port = 465;
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = ”miousername@gmail.com“; // Enter your SMTP username
$mail->Password = ”miapassword“; // SMTP password
$webmaster_email = ”webmasterusername@gmail.com“; //Add reply-to email address
$email=”destinatariousername@libero.it“; // Add recipients email address
$name=”name“; // Add Your Recipient’s name
$mail->From = $webmaster_email;
$mail->FromName = ”Webmaster”;
$mail->AddAddress($email,$name);
$mail->AddReplyTo($webmaster_email,”Webmaster”);
$mail->WordWrap = 50; // set word wrap
//$mail->AddAttachment(“/var/tmp/file.tar.gz”); // attachment
//$mail->AddAttachment(“/tmp/image.jpg”, “new.jpg”); // attachment
$mail->IsHTML(true); // send as HTML

$mail->Subject = ”This is your subject“;

$mail->Body =      ”Hi, this is your email body, etc, etc” ;      //HTML Body

$mail->AltBody = ”Hi, this is your email body, etc, etc“;     //Plain Text Body

if(!$mail->Send()){
echo “Mailer Error: ” . $mail->ErrorInfo;
} else {
echo “Message has been sent”;
}

?>
La configurazione dell'host e della porta l'ho inserita nel codice (questo perchè non ho capito dove metterli nel file "class.smtp.php") ed ora ho il seguente errore: "Mailer Error: SMTP connect() failed.".
Quale potrebbe essere la causa? grazie