https://github.com/ookris/QUrl if (empty($_POST['email'])) { exit('No access'); } // Generating current date. $reportDate = date('d.m.Y H:i'); // Generating a random six-number report number $reportID = mt_rand(100000, 999999); // Load config file include('qurl/config.php'); //PHPMailer Library use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; require 'qurl/PHPMailer/src/Exception.php'; require 'qurl/PHPMailer/src/PHPMailer.php'; require 'qurl/PHPMailer/src/SMTP.php'; $mail = new PHPMailer(true); try { //Server settings //$mail->SMTPDebug = SMTP::DEBUG_SERVER; $mail->isSMTP(); $mail->Host = $emailHost; $mail->SMTPAuth = $emailSMTPAuth; $mail->Username = $emailUsername; $mail->Password = $emailPassword; $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->Port = $emailPort; //Recipients $mail->setFrom($emailFromAddress, $emailFromName); $mail->addAddress($emailFromAddress); //Content $mail->isHTML(true); $mail->CharSet = 'UTF-8'; if (empty($_POST['email'])) { echo ''; } else { $mail->addReplyTo($_POST['email']); } $mail->Subject = $qurlLang['send_email_message_subject'] . $reportID; $mail->Body = <<{$qurlLang['send_email_message_body_h2']}
{$qurlLang['send_email_message_body_date']} $reportDate
{$qurlLang['send_email_message_body_email']} {$_POST['email']}
{$qurlLang['send_email_message_body_message']} {$_POST['Textarea']}


-----
#ID$reportID EOT; $mail->send(); $message = ''; } catch (Exception $e) { $message = ''; } ?> ' . $qurlLang['current_page_title_contact_send']; // load header template require_once ('qurl/header.php'); ?>