Advertisement
Guest User

Untitled

a guest
Oct 9th, 2017
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. $mail = new PHPMailer();
  2.  
  3. $mail->IsSMTP(); // set mailer to
  4.  
  5. $mail->Host = "mail.boris.cl"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = 'contacto@boris.cl'; // SMTP username $mail->Password = "dipu2018?"; // SMTP password
  6.  
  7. $mail->From = "contacto@boris.cl"; $mail->FromName = "remitente"; // remitente $mail->AddAddress("bvr@gmail.com", "destinatario"); // destinatario
  8.  
  9. $mail->WordWrap = 50; // set word wrap to 50 characters $mail->IsHTML(true); // set email
  10.  
  11. $mail->Subject = "Asunto ....."; $mail->Body = "Cuerpo del mensaje";
  12.  
  13. if(!$mail->Send()) { echo "Error al enviar.
  14.  
  15. "; echo "Mailer Error: " . $mail->ErrorInfo; exit; }
  16.  
  17. echo "Mensaje enviado!"; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement