File: /home/inveservice/public_html/phpmailer/review_phpmailer_template.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Ansonika">
<title></title>
<!-- Favicons-->
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" type="image/x-icon" href="img/apple-touch-icon-57x57-precomposed.png">
<link rel="apple-touch-icon" type="image/x-icon" sizes="72x72" href="img/apple-touch-icon-72x72-precomposed.png">
<link rel="apple-touch-icon" type="image/x-icon" sizes="114x114" href="img/apple-touch-icon-114x114-precomposed.png">
<link rel="apple-touch-icon" type="image/x-icon" sizes="144x144" href="img/apple-touch-icon-144x144-precomposed.png">
<!-- GOOGLE WEB FONT -->
<link href="https://fonts.googleapis.com/css?family=Work+Sans:400,500,600" rel="stylesheet">
<!-- BASE CSS -->
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/style.css" rel="stylesheet">
<link href="../css/vendors.css" rel="stylesheet">
<!-- YOUR CUSTOM CSS -->
<link href="../css/custom.css" rel="stylesheet">
<script type="text/javascript">
function delayedRedirect(){
window.location = "../review-wizard-version.html"
}
</script>
</head>
<body onLoad="setTimeout('delayedRedirect()', 8000)" style="background-color:#fff;">
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'src/Exception.php';
require 'src/PHPMailer.php';
$mail = new PHPMailer(true);
try {
//Recipients - main edits
$mail->setFrom('info@wilio.com', 'Message from Wilio'); // Email Address and Name FROM
$mail->addAddress('jhon@wilio.com', 'Jhon Doe'); // Email Address and Name TO - Name is optional
$mail->addReplyTo('noreply@wilio.com', 'Message from Wilio'); // Email Address and Name NOREPLY
$mail->isHTML(true);
$mail->Subject = 'Message from Wilio'; // Email Subject
//The email body message
$message = "<strong>Details</strong><br />";
$message .= "1) How do you describe your overall satisfaction?" . "<br />";
$message .= "Service provided: " . $_POST['rating_input_1'] . "<br />";
$message .= "Product quality : " . $_POST['rating_input_2'] . "<br />";
$message .= "Support: " . $_POST['rating_input_3'] . "<br />";
$message .= "General satisfaction: " . $_POST['rating_input_4'] . "<br />";
$message .= "<br />2) Your review and comments:";
$message .= "<br />" . $_POST['review_message'] . "<br />";
$message .= "<br /><strong>User Details</strong><br />";
$message .= "First name: " . $_POST['firstname'] . "<br />";
$message .= "Last name: " . $_POST['lastname'] . "<br />";
$message .= "Email: " . $_POST['email'] . "<br />";
if( isset( $_POST['telephone'] ) && $_POST['telephone']) {
$message .= "Telephone: " . $_POST['telephone'] . "<br />";
}
$message .= "Terms and conditions accepted: " . $_POST['terms'];
// Get the email's html content
$email_html = file_get_contents('template-email.html');
// Setup html content
$body = str_replace(array('message'),array($message),$email_html);
$mail->MsgHTML($body);
$mail->send();
// Confirmation/autoreplay email send to who fill the form
$mail->ClearAddresses();
$mail->addAddress($_POST['email']); // Email address entered on form
$mail->isHTML(true);
$mail->Subject = 'Confirmation'; // Custom subject
// Get the email's html content
$email_html_confirm = file_get_contents('confirmation.html');
// Setup html content
$body = str_replace(array('message'),array($message),$email_html_confirm);
$mail->MsgHTML($body);
$mail->Send();
echo '<div id="success">
<div class="icon icon--order-success svg">
<svg xmlns="http://www.w3.org/2000/svg" width="72px" height="72px">
<g fill="none" stroke="#8EC343" stroke-width="2">
<circle cx="36" cy="36" r="35" style="stroke-dasharray:240px, 240px; stroke-dashoffset: 480px;"></circle>
<path d="M17.417,37.778l9.93,9.909l25.444-25.393" style="stroke-dasharray:50px, 50px; stroke-dashoffset: 0px;"></path>
</g>
</svg>
</div>
<h4><span>Request successfully sent!</span>Thank you for your time</h4>
<small>You will be redirect back in 5 seconds.</small>
</div>';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
?>
<!-- END SEND MAIL SCRIPT -->
</body>
</html>