Sembrerebbe che il link sul loro sito per la versione php 5 sia sbagliato, in quanto ti rimanda a una vecchia versione. Il link corretto per l'ultima versione è questo:
http://sourceforge.net/projects/phpm...1.zip/download
e il file da includere (se scarichi dal link che ti ho dato) è 'class.phpmailer.php' e questo è un esempio:
Codice PHP:$mail = new PHPMailer(true); //New instance, with exceptions enabled
$body = 'testo email';
// decommenta il seguente blocco di codice commentato se vuoi usare un server SMTP e imposta i valori
/*
$mail->IsSMTP(); // tell the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 25; // set the SMTP server port
$mail->Host = "mail.yourdomain.com"; // SMTP server
$mail->Username = "name@domain.com"; // SMTP server username
$mail->Password = "password"; // SMTP server password
$mail->IsSendmail(); // tell the class to use Sendmail
*/
$mail->AddReplyTo("name@domain.com","First Last");
$mail->From = "name@domain.com";
$mail->FromName = "First Last";
$to = "someone@example...com";
$mail->AddAddress($to);
$mail->Subject = "First PHPMailer Message";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->WordWrap = 80; // set word wrap
$mail->MsgHTML($body);
$mail->IsHTML(true); // send as HTML
$mail->Send();

Rispondi quotando