<?php 
			
									
						$qrysit = mysqli_query($conn,"SELECT * FROM settings");
						$sit = mysqli_fetch_array($qrysit);
					
					$tok = $resp->description->Token;
					$unitss = $resp->description->Units;
					$meter = $resp->description->meterNumber;
					$productName = $resp->description->product_name;
					
					
				
					
				$sitname = $sit['sitename'];
				$hosturl = $_SERVER['HTTP_HOST'];
									
				// send email

$from = "$sitname<info@$hosturl>"; //the email address from which this is sent
$to = "$email"; //the email address you're sending the message to
$subject = "Transaction notification "; //the subject of the message

// To send HTML mail, the Content-type header must be set
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "Return-Path: $sitname<support@$hosturl>\r\n";
$headers .= "Organization: $sitname\r\n";
 
// Create email headers
$headers .= 'From: '.$from."\r\n".
    'Reply-To: '.$from."\r\n" .
    'X-Mailer: PHP/' . phpversion();

$message = "

<html>
<head>
<style>
.table {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 50%;
}

td {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #dddddd;
}


.button {
  background-color: #008CBA; /* Blue */
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  
  -webkit-transition-duration: 0.4s; /* Safari */
  transition-duration: 0.4s;
}

.button:hover {
  background-color: #4CAF50; /* Green */
  color: white;
}

</style>
</head>

<body>

<img src='https://$hosturl/portal/sitelogo/logo.png'>

<h3>Dear $fname $lname,</h3>

Your transaction on $sitname was succeessful <br>

<strong>Your transaction details are as follows:</strong> <p>
  <tr>
    <td>Product Name</td>  
    <td> $plan</td>
  </tr>

   <tr>
    <td>Total Amount Paid</td>
    <td> $debit</td>
  </tr>
  

<tr>
    <td> PIN/TOKEN</td>
    <td> $show </td>
  </tr>


 <tr>
    <td>Transaction ID</td>
    <td> $requestId</td>
  </tr>


 <tr>
    <td>Status</td>
    <td> Completed</td>
  </tr>

 <tr>
    <td>Balance Before</td>
    <td> $bal</td>
  </tr>

 <tr>
    <td>Balance After</td>
    <td> $balanceA</td>
  </tr>
  
</table> 

$sitname give you instant and automated recharge for Airtime, <br>
Internet Data, Gotv, Dstv, Startimes, Electric Token, Smile Internet, <br>
WAEC, JAMB, NECO, NABTEB Pins, Recharge Card Pins, Bank transfer, Bulk SMS and lots more...

<a href='https://$hosturl'><button class='button'>Try it Now!</button></a> <br>



Our support team is standby to assist you wherever you need help. <br>
If you have any question regarding this transaction please Contact:

<strong>Email:</strong> support@$hosturl <br>




Warm Regards. <br>

www.$hosturl <br>
$sitephone

</body><html>";

//now mail
$DoMail = mail($to,$subject,$message,$headers);
				
				
								

	   
	 

//
?>