Advertisement
Guest User

A

a guest
Oct 29th, 2015
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.56 KB | None | 0 0
  1. require_once("../../phpmailer/PHPMailerAutoload.php");
  2.  
  3.                                 $mail = new PHPMailer;
  4.  
  5.                                 // Debug para ver errores
  6.                                 $mail->SMTPDebug = 3;                              
  7.                                 //hacemos que  PHPMailer use SMTP.
  8.                                 $mail->isSMTP();            
  9.                                 //direccion                          
  10.                                 $mail->Host = "smtp.gmail.com";
  11.                                 //poner verdadero para requerir autorizacion
  12.                                 $mail->SMTPAuth = true;                          
  13.                                 //Usuario y contraseña  
  14.                                 $mail->Username = "rakall66@gmail.com";                
  15.                                 $mail->Password = "rakall11";                          
  16.                                 //If SMTP requires TLS encryption then set it
  17.                                 $mail->SMTPSecure = "tls";                          
  18.                                 //Set TCP port to connect to
  19.                                 $mail->Port = 587;                                  
  20.                                
  21.                                 $mail->From = "rakall66@gmail.com";
  22.                                 $mail->FromName = "No responder - Informacion Pago";
  23.                                 $receptor="testingfield1@hotmail.com";
  24.                                 $mail->addAddress($receptor, "El que recibe");
  25.                                
  26.                                 $mail->isHTML(true);
  27.                                
  28.                                 $mail->Subject = "Pago en Vidya";
  29.                                 $mail->Body = "<i>Usted ".$login_session."  ha realizado un pago en Vidya </i>";
  30.                                 $mail->AltBody = "Version en texto plano";
  31.                                 //$mail->AddAttachment("facturas/factura.pdf");
  32.                                 //$mail->AddAttachment( $destino, 'factura.pdf' );
  33.                                 if(!$mail->send())
  34.                                 {
  35.                                     echo "Mailer Error: " . $mail->ErrorInfo;
  36.                                 }
  37.                                 else
  38.                                 {
  39.                                     echo " error";
  40.                                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement