Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('class.phpmailer.php');
- require_once('class.smtp.php');
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'mail.ovh.net';
- $mail->SMTPAuth = true;
- $mail->Username = 'no-reply@piiiblo.fr';
- $mail->Password = '604s8R067274GHN';
- $mail->SMTPSecure = 'tls';
- $mail->SMTPOptions = array(
- 'ssl' => array(
- 'verify_peer' => false,
- 'verify_peer_name' => false,
- 'allow_self_signed' => true
- )
- );
- $mail->Port = 25;
- $mail->setFrom('no-reply@piiiblo.fr', 'Contact piiiblo.fr');
- $mail->addAddress('piiiblo.pro@gmail.com');
- $mail->isHTML(true);
- $mail->CharSet = 'UTF-8';
- $mail->Subject = 'Conctact depuis piiiblo.fr';
- $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';
- if (!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- header('Location: index.html');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement