Advertisement
Guest User

Untitled

a guest
Jan 25th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. require_once('class.phpmailer.php');
  4. require_once('class.smtp.php');
  5. $mail = new PHPMailer;
  6. $mail->isSMTP();
  7. $mail->Host = 'mail.ovh.net';
  8. $mail->SMTPAuth = true;
  9. $mail->Username = 'no-reply@piiiblo.fr';
  10. $mail->Password = '604s8R067274GHN';
  11. $mail->SMTPSecure = 'ssl';
  12. $mail->Port = 465;
  13.  
  14. $mail->setFrom('no-reply@piiiblo.fr', 'Contact piiiblo.fr');
  15. $mail->addAddress('piiiblo.pro@gmail.com');
  16.  
  17. $mail->isHTML(true);
  18.  
  19. $mail->CharSet = 'UTF-8';
  20. $mail->Subject = 'Conctact depuis piiiblo.fr';
  21. $mail->Body = 'Bonjour,<br>Quelqu\'un vous a écrit depuis piiiblo.fr !<br><br>Nom : ' . $_POST['name'] . '<br>Mail : ' . $_POST['mail'] . '<br>Message : ' . $_POST['message'] . '<br><br>Bisous bb';
  22.  
  23. if (!$mail->send()) {
  24.     echo 'Message could not be sent.';
  25.     echo 'Mailer Error: ' . $mail->ErrorInfo;
  26. } else {
  27.     header('Location: index.html');
  28. }
  29.  
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement