| Server IP : 52.9.100.119 / Your IP : 216.73.216.226 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/provincomx/vendor/ |
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 'autoload.php';
$data = json_decode(file_get_contents("php://input"));
$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 = 'smtpout.secureserver.net'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'rodrigoteran@provinco.com.mx'; // SMTP username
$mail->Password = 'Yhtxpgdj511!'; // 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 = $data->name;
$correo = $data->email;
$mail->setFrom('rodrigoteran@provinco.com.mx', 'Website');
$mail->addAddress('rodrigoteran@provinco.com.mx'); // Add a recipient
//Content
$phone = $data->phone;
$mail->isHTML(true);
$mail->Subject = 'Contact from Provinco MX';
$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>Telefono:</b><br>';
$mail->Body .= $phone;
$mail->send();
echo '200';
exit;
} catch (Exception $e) {
echo 'Mailer Error: ' . $mail->ErrorInfo;
}