| Server IP : 52.9.100.119 / Your IP : 216.73.216.135 Web Server : Apache/2.4.61 (Amazon) OpenSSL/1.0.2k-fips PHP/7.3.30 Phusion_Passenger/5.1.5 System : Linux ip-172-31-9-35 4.14.355-196.618.amzn1.x86_64 #1 SMP Mon Apr 7 17:09:50 UTC 2025 x86_64 User : root ( 0) PHP Version : 7.3.30 Disable Function : exec,passthru,shell_exec,system,popen,proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /data/html/playmoob/ |
Upload File : |
<?php
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
//Load composer's autoloader
require 'vendor/autoload.php';
// require 'vendor/phpmailer/phpmailer/src/Exception.php';
// require 'vendor/phpmailer/phpmailer/src/PHPMailer.php';
// require 'vendor/phpmailer/phpmailer/src/SMTP.php';
$mail = new PHPMailer(true); // Passing `true` enables exceptions
try {
//Server settings
$mail->SMTPDebug = 2; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'quattromktg@gmail.com'; // SMTP username
$mail->Password = 'qmg.2018'; // SMTP password
$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465; // TCP port to connect to
$mail->CharSet = "UTF-8";
//Recipients
$name = $_POST['nombre'];
$correo = $_POST['correo'];
$mail->setFrom($correo, 'Contacto Playmoob');
$mail->addAddress('contacto@siprorecubrimientos.com.mx'); // Add a recipient
//Content
$mensaje= $_POST['mensaje'];
$mail->isHTML(true);
$mail->Subject = 'Correo desde pagina web Playmoob';
$mail->Body = '<b>Nombre: </b><br>';
$mail->Body .= $name;
$mail->Body .= '<br><br><b>Correo:</b><br>';
$mail->Body .= $correo;
$mail->Body .= '<br><br><b>Mensaje:</b><br>';
$mail->Body .= $mensaje;
$mail->send();
echo 'Su mensaje se envió exitosamente. Nos pondremos en contacto cuanto antes.';
header('Location: index.html');
exit;
} catch (Exception $e) {
echo 'El mensaje no pudo ser enviado. Intente nuevamente. <br>';
echo 'Mailer Error: ' . $mail->ErrorInfo;
}