Advertisement
flaviohuanacchiri

enviar correo

Jun 9th, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. <?php
  2. include (__DIR__.'/app/libs/phpmailer/PHPMailerAutoload.php');
  3. $mail = new PHPMailer;
  4. $mail->IsHTML(true);
  5. $mail->CharSet = "UTF-8";
  6. //$mail->isSMTP(); // Set mailer to use SMTP
  7. $mail->Host = 'mail.infinitydental.pe'; // Specify main and backup SMTP servers
  8. //$mail->SMTPAuth = true; // Enable SMTP authentication
  9. $mail->Username = 'phpmailer@infinitydental.pe'; // SMTP username
  10. $mail->Password = 'Z%EucSDb[h8U'; // SMTP password
  11. $mail->Port = 26;
  12. $mail->From = "phpmailer@infinitydental.pe";
  13. $mail->FromName = 'Contacto Infinity';
  14. $mail->Subject = "Tienes un nuevo Mensaje desde tu formulario de contacto";
  15. $body = "";
  16. $body.="<tr><td><b>Nombre: </b></td><td>".$_POST['nombre']."</td></tr>";
  17. $body.="<tr><td><b>Email: </b></td><td>".$_POST['email']."</td></tr>";
  18. $body.="<tr><td><b>Telefono: </b></td><td>".$_POST['telefono']."</td></tr>";
  19. $body.="<tr><td><b>Asunto: </b></td><td>".$_POST['asunto']."</td></tr>";
  20. $body.="<tr><td><b>Mensaje: </b></td><td>".$_POST['mensaje']."</td></tr>";
  21. $mail->Body = $body;
  22. $mail->addAddress('clinica@infinitydental.pe','Clinica Dental');
  23. //$mail->addAddress('flavio.huanacchiri@gmail.com','Clinica Dental');
  24. $mail->addBCC('centralinfinity2016@gmail.com');
  25. if($mail->send())
  26. echo "enviado";
  27. else
  28. echo "no enviado";
  29. //$this->mail->addReplyTo('no-reply@beautybookers.pe', 'Beauty Bookers');
  30. //$this->mail->addReplyTo(EMAIL_REPLY, NOMBRE_REPLY);
  31. //$this->mail->addBCC('flavio.huanacchiri@gmail.com');
  32.  
  33. print_r($_POST);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement