Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/12/2010, 19:23
Avatar de xSkArx
xSkArx
 
Fecha de Ingreso: marzo-2008
Ubicación: Chile
Mensajes: 945
Antigüedad: 16 años, 2 meses
Puntos: 96
Ayuda con PHPMailer y script

Buenas tengo un script ke manda un korreo kn siertos datos pero no me funka
y tengo phpmailer y si funka
lo ke kiero hacer es integrar el phpmailer kn el kodigo ke tengo

este es el kodigo del script

Código PHP:
Ver original
  1. $headers = "De:$email \nContent-type: text/html\n";    
  2.     $sub = "[VALIDACION FLOG - $login]";
  3.     $enviar = "
  4.     <html>
  5.     <head>
  6.     </head>
  7.     <body>
  8.     <p><font face=\"Verdana\" size=\"1\">
  9.     <hr>
  10. .:: Fotolog :: El Desván ::.<br>
  11.     Usted solicitó un registro en el sitio <b>$url_site</b><br>
  12.     Para concluir su registro es necesario ingresar en la siguiente URL :<br><br>
  13.     <a href = \"$url_site/$login/$pag\">$url_site/$login/$pag</a>              
  14.     <br>   
  15.     <hr>
  16.     Este es un mensage automático, no lo responda!<br>
  17.     $url_site!<br>
  18.     </font></p>
  19.     </body>
  20.     </html>";
  21.     if(!mail($email,$sub,$enviar,$headers)){
  22.     br();
  23.     echo "Ocurrió un error al enviar el email de validación. Por favor, contacte con el administrador - [email protected]";
  24.     br();
  25.     "Su email de validación fue enviado correctamente a su email - $email";
  26.     br();
  27.     "Cuando reciba el email, clique el link para validar su login.";
  28.     br();
  29.     }
  30. }

y este es el kodigo del phpmailer

Código PHP:
Ver original
  1. <?php
  2.  
  3. require_once 'class.phpmailer.php';
  4.  
  5. $mail = new PHPMailer ();
  6.  
  7. $mail -> From = "[email protected]";
  8. $mail -> FromName = "SkAr";
  9. $mail -> AddAddress ("[email protected]");
  10. $mail -> Subject = "Test";
  11. $mail -> Body = "<h3>From GMail!</h3>";
  12. $mail -> IsHTML (true);
  13.  
  14. $mail->IsSMTP();
  15. $mail->Host = 'ssl://smtp.gmail.com';
  16. $mail->Port = 465;
  17. $mail->SMTPAuth = true;
  18. $mail->Username = '[email protected]';
  19. $mail->Password = '*****';
  20.  
  21. if(!$mail->Send()) {
  22.     echo 'Error: ' . $mail->ErrorInfo;
  23. }
  24. else {
  25. echo 'Mail enviado!';
  26. }
  27. ?>

o como debo configurar el php.ini para usar el sevicio de gmail