No se que puedo estar haciendo mal, alguien me podria decir?.
form:
Código HTML:
Ver original
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <form id="form1" name="form1" method="post" action="enviando.php"> <label> <input name="nombre" type="text" id="nombre" /> </label> <br /> Telefono:<br /> <input name="telefono" type="text" id="telefono" /> <br /> Email:<br /> <input name="email" type="text" id="email" /> <br /> Mensaje:<br /> <br /> <label> <input type="submit" name="Submit" value="Enviar Formulario" /> </label> </p> </form> </body> </html>
enviando.php:
Código PHP:
Ver original
<?php require("class.phpmailer.php"); $mail = new phpmailer(); $mail->Mailer = "smtp"; $mail->Host = "smtp.aol.com"; $mail->SMTPAuth = true; $mail->Password = "xxxxx"; $mail->FromName = "den_22"; $mail->Timeout=30; $mail->Subject = "Prueba de phpmailer"; $mail->Body = "<b>Mensaje de prueba mandado con phpmailer en formato html</b>"; $mail->AltBody = "Mensaje de prueba mandado con phpmailer en formato solo texto"; $exito = $mail->Send(); $intentos=1; while ((!$exito) && ($intentos < 5)) { //echo $mail->ErrorInfo; $exito = $mail->Send(); $intentos=$intentos+1; } if(!$exito) { echo "Problemas enviando correo electrónico a ".$valor; echo "<br/>".$mail->ErrorInfo; } else { echo "Mensaje enviado correctamente"; } ?>