Ver Mensaje Individual
  #9 (permalink)  
Antiguo 26/02/2012, 21:38
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 8 meses
Puntos: 6
Respuesta: recuperar contraseña mediante un email de sistema de usuarios

gracias por responder

tengo este formulario donde el usuario va a digitar el correo para que le llegue la clave


Código PHP:
Ver original
  1. <form id="form1" name="form1" method="post" action="">
  2.                 <br />
  3.   <input type="text" name="mail" id="mail" />
  4.   <br />
  5.   <br />
  6. <input type="submit" name="button" id="button" value="Recuperar" />
  7. </form>

el codigo que me dijiste donde lo pongo en el post

Código PHP:
Ver original
  1. $mail             = new PHPMailer(); // defaults to using php "mail()"
  2.  
  3. $body             = file_get_contents('contents.html');
  4. $body             = preg_replace('/[\]/i','',$body);
  5.  
  6. $mail->AddReplyTo("[email protected]","First Last");
  7.  
  8. $mail->SetFrom('[email protected]', 'First Last');
  9.  
  10. $mail->AddReplyTo("[email protected]","First Last");
  11.  
  12. $address = "[email protected]";
  13. $mail->AddAddress($address, "John Doe");
  14.  
  15. $mail->Subject    = "PHPMailer Test Subject via mail(), basic";
  16.  
  17. $mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
  18.  
  19. $mail->MsgHTML($body);
  20.  
  21. $mail->AddAttachment("images/phpmailer.gif");      // attachment
  22. $mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
  23.  
  24. if(!$mail->Send()) {
  25.   echo "Mailer Error: " . $mail->ErrorInfo;
  26. } else {
  27.   echo "Message sent!";
  28. }