- Details
Request Information Process
<?php
if(isset($_POST['btn-submit-quotation']))
{
$name = $_POST["full-name"];
$company_name = $_POST["company-name"];
$email_address = $_POST["Email"];
$phone = $_POST["Phone"];
$address = $_POST["address"];
$city = $_POST["city"];
$state = $_POST["state"];
$zip_code = $_POST["zip-code"];
$description= $_POST["description"];
$message = '
<style>
.request-quotation{
border:solid 0px red;
width:90%;
}
.request-quotation form{
}
.request-quotation .asterisk{
color:red;
}
.request-quotation table{
border:solid 1px #eee;
}
.request-quotation table tr{
border-bottom:solid 1px #eee;
}
.request-quotation table td{
padding:10px;
}
.request-quotation table td.label-field{
width:250px;
}
.request-quotation table td.input-field{
width:500px;
display:block;
border:solid 0px red;
color:#000;
}
.request-quotation table td.input-field input[type="text"],
.request-quotation table td.input-field select
{
width:90%;
display:block;
padding:7px;
}
.request-quotation table td.input-field .btn-submit-quotation,
.request-quotation table td.input-field input[type="submit"]{
width:50%;
padding:7px;
}
</style>
<div class="request-quotation">
<table>
<tr>
<td class="label-field">Full Name</td>
<td class="input-field">'.$name.'</td>
</tr>
<tr>
<td class="label-field">Company Name</td>
<td class="input-field">'.$company_name.'</td>
</tr>
<tr>
<td class="label-field">Email</td>
<td class="input-field">'.$email_address.'</td>
</tr>
<tr>
<td class="label-field">Phone</td>
<td class="input-field">'.$phone.'</td>
</tr>
<tr>
<td class="label-field">Address</td>
<td class="input-field">'.$address.'</td>
</tr>
<tr>
<td class="label-field">City</td>
<td class="input-field">'.$city.'</td>
</tr>
<tr>
<td class="label-field">State</td>
<td class="input-field">'.$state.'</td>
</tr>
<tr>
<td class="label-field">Zip Code</td>
<td class="input-field">'.$zip_code.'</td>
</tr>
<tr>
<td class="label-field">Request</td>
<td class="input-field">'.$description.'</td>
</tr>
</table>
</div>
';
require("PHPMailer/src/Exception.php");
require("PHPMailer/src/PHPMailer.php");
require("PHPMailer/src/SMTP.php");
$mail = new PHPMailer(true);
//Server settings
$mail->SMTPBebug = SMTP::DEBUG_SERVER;
$mail->isSMTP();
$mail->SMTPDebug = 2;
//$mail->Host = 'smtpout.secureserver.net';
//$mail->Host = 'localhost';
//$mail->SMTPAuth = true;
//$mail->SMTPAutoTLS = true;
//$mail->Username =
//$mail->Password = 'Muv95M!nYy$7';
//$mail->SMTPSecure = 'TLS';
//$mail->Port = 587;
$mail->Host = 'p3plvcpnl412308.prod.phx3.secureserver.net';
$mail->SMTPAuth = true;
$mail->SMTPAutoTLS = true;
$mail->Username =
$mail->Password = 'Muv95M!nYy$7';
$mail->SMTPSecure = 'TLS';
$mail->Port = 587;
//Recipients
//$mail->setFrom(
$mail->setFrom(
//$mail->setFrom($email_address,$name);
//$mail->addAddress(
$mail->addAddress(
//$mail->addAddress(
$mail->addAddress(
//$mail->addAddress(
//$mail->addAddress(
//$mail->addReplyTo(
//$mail->addCC(
//$mail->addCC(
//$mail->addCC(
// Attachments
//$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
//$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
// Content
$mail->isHTML(true);
$mail->Subject = 'Request Information From '.$name.'';
$mail->Body = $message;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
//$mail->send();
//send the message, check for errors
if (!$mail->send())
{
echo'Mail Error: '.$mail->ErrorInfo;
} else
{
header('Location: index.php?option=com_content&view=article&id=902');
}
}//if
?>