Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'conexionbd.php';
- include 'PHPMailer/src/PHPMailer.php';
- $oMail = new PHPMailer();
- $oMail->isSMTP();
- $oMail->Host = 'smtp.mailtrap.io';
- $oMail->Username = ' 45d7f968676e1e';
- $oMail->Password = '166b3920081adc';
- $oMail->SMTPAuth = true;
- $oMail->SMTPSecure = 'tls';
- $oMail->Port = 25;
- //Datos
- $name = $_POST['name'];
- $oMail->From = $_POST['email']; //remitente
- $oMail->addAddress('gpojava@gmail.com');
- $oMail->Subject = 'HOLA JAVAEVENTOS SOY';
- $mail->Body = $_POST['mensaje'];
- $oMail->send();
- if($oMail->send() == false){
- header('Location:socios.php');
- echo $oMail->ErrorInfo();
- }else{
- header('Location:index.php');
- }
Add Comment
Please, Sign In to add comment