Guest User

Untitled

a guest
Nov 1st, 2017
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. $mail = new PHPMailer();
  2. $mail->IsSMTP();
  3. $mail->SMTPAuth= true;
  4. //$mail->SMTPSecure = "ssl";
  5. $mail->Host ="dominio";
  6. $mail->Username="notificaciones@dominio.org.mx";
  7. $mail->Password ="@@@@@@@@";
  8. $mail->Port = 25;
  9. $mail->From = $email;
  10. $mail->FromName="Notificaciones - ".$mercancia_para;
  11. $mail->AddAddress(Core::$user->email);
  12. $mail->AddAddress("correo1@dominio.org.mx");
  13. //$mail->AddCC("correx@gmail.com");
  14. $mail->AddCC("correo2@dominio.org.mx");
  15. $mail->IsHTML(true);
  16.  
  17. $mail->Subject = $asunto;
  18. $mail->Body = $contenido;
  19. $mail->WordWrap = 50;
  20. $mail->MsgHTML($contenido);
  21.  
  22. if($mail->Send()){
  23. $respuesta ="<h2 style='color:#0A7A39;'>Solicitud Realizada con exito!</h2>, <br> <strong>¡Se ha generado el folio de solicitud: ".$folio_ingreso." y se envio notificación via email!</strong>";
  24. echo $respuesta;
  25. }else{
  26. $respuesta ="<div class='alert alert-danger'><strong>Error!!!</strong> Intenta mas tarde! </div>".$mail->ErrorInfo;
  27. echo $respuesta;
  28. }
Add Comment
Please, Sign In to add comment