Guest User

Untitled

a guest
Jun 11th, 2018
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <?php
  2.  
  3. class MvcBug{
  4.  
  5.  
  6. public function nuevoReporteBugController($tabla, $redireccionamiento){
  7.  
  8. if (isset($_POST["bugReport"])) {
  9. $dato = $_POST["bugReport"];
  10. $dato = trim($dato);
  11. $respuesta = MvcControllerBug::nuevoReporteBugModel($dato, $tabla, $redireccionamiento, $_SESSION["idUsuario"]);
  12. unset($_POST['bugReport']);
  13. }
  14. }
  15.  
  16. <?php
  17. use PHPMailerPHPMailerPHPMailer;
  18. require 'mail/autoload.php';
  19. $mail = new PHPMailer;
  20. $mail->isSMTP();
  21. $mail->SMTPDebug = 2;
  22. $mail->Host = 'smtp.gmail.com';
  23. $mail->Port = 25;
  24. $mail->SMTPSecure = 'tls';
  25. $mail->SMTPAuth = true;
  26. $mail->Username = "············";
  27. $mail->Password = "············";
  28. $mail->setFrom('...............', '...........');
  29. $mail->addReplyTo('replyto@example.com', 'Base');
  30. $mail->addAddress("..........", "...........");
  31.  
  32. $mail->Subject = "Prueba";
  33. $mail->msgHTML(file_get_contents('contents.html'), __DIR__);
  34. $mail->AltBody = 'This is a plain-text message body';
  35. $mail->send();
  36. ?>
Add Comment
Please, Sign In to add comment