<?php 
	
	$user = help::get_user($user['email']); // update user variable;
	
	## ----
	
	$mailer = new mailer();
	$mailer->addAddress($user['email']);
	$mailer->Subject = ucwords("{$data['tx_type']} Alert");
	
	$TABLE = $mailer->table(array(
		array("Reference", $data['tx_no']),
		array("Account No", $data['account']),
		array("Amount", "{$currency}{$data['amount']}"),
		array("Charge", "{$currency}{$data['charges']}"),
		array("Description", $data['description']),
		array("Date", $data['date']),
		array("status", $data['status']),
		array("Balance", $user['balance'])
	));
	
	$mailer->Body = "
		<section>
			Dear {$user['fname']}, <br>
			This is to inform you that your account has been {$data['tx_type']}ed. Review statement below
			{$TABLE}
		</section>
	";
	
	$mailer->send();
	

