Problemas con phpmailer

kike2lucas
08 de Julio del 2008
Tengo problemas con el Php mailer.No me encuentra la clase AddAddress. El error que me da es el siguiente:

Fatal error: Call to undefined method stdClass::AddAddress() in C:Program FilesxampphtdocsKikemailejercicio10_2.php on line 43
Y el siguiente es el código del programa:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form action="ejercicio10_2.php" method="POST" enctype="multipart/form-data" name="form1">
<table width="456">
<tr>
<td width="55">Para:</td>
<td width="327"><input name="para" type="text" size="50"></td>
</tr>
<tr>
<td>Asunto:</td>
<td><input name="asunto" type="text" size="50"></td>
</tr>
<tr>
<td height="72" valign="top">Mensaje:</td>
<td width="50"><textarea name="mensaje" cols="50" rows="15"></textarea></td>
</tr>
<tr>
<td>Adjuntar archivo: </td>
<td><input name="file" type="file" size="40"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Enviar"></td>
</tr>
</table>
</form>

<?php
if (isset($_POST["Submit"])){//si se intenta enviar un correo

require_once ("includes/class.phpmailer.php");
$prueba = new phpmailer();
$mail ->From= "[email protected]";//datos (email) del que envía el correo
$mail ->FromName= "Luis Enrique Rodriguez";//nombre del que envía
$mail ->Subject=$_POST["asunto"];//asunto
$mail ->Body=$_POST["mensaje"];//cuerpo del mensaje
$mail ->AddAddress ($_POST ["para"]);//correo destino
if (!$mail->AddAttachment($_FILES["file"])){
echo "No se pudo adjuntar el archivo";
}
if (!$mail->Send()){
echo "No se pudo enviar el mensaje";
}


}
?>
</body>
</html>
Que es lo que pasa?
Gracias