<?php 

$to = $rowUser['email'];
$subject = 'Transfer Notification';
$from = 'no-replay@mtro.com';
$replyto = 'no-replay@mtro.com'; 

// 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";

// Create email headers
$headers .= 'From: '. $to ."\r\n".
    'Reply-To: '. $replyto ."\r\n" .
    'X-Mailer: PHP/' . phpversion();
 
//Compose a simple HTML email message
$message = '<html><body style="padding: 20px;">';

$message .= '<div style="width: 100%; display:inline; float: left; ">';

$message .= '<p style="color:rgba(0, 0, 0, 0.9); font-size:14px; font-family:Helvetica; padding;9px; margin:10px 0px 10px 0px;">Hello '. $rowUser['cust_name'] . '</p>';

$message .= '<div><span style="color:rgba(0, 0, 0, 0.6); font-family: Helvetica; font-size:14px; "> Your transfer has been successfully completed </div>';

$message .= '<div style= "margin-top: 30px; font-family: Helvetica; font-size:14px; color:rgba(0, 0, 0, 0.4); ">';

$message .= '<p style="">You have successfully wired '. $rowTrans['amt_trans'] .'  to ' . $rowTrans['ben_name'] . '</p>';

$message .= '<p style="color:#080;">Below are the transaction details </p>';

$message .= '<div style="margin-top: 10px; font-family: Helvetica; font-size:13px; color:rgba(0, 0, 0, 0.7); border: 1px solid rgba(0, 0, 9, 0.1); padding: 20px 40px;">';

$message .= '<div style="padding: 10px 0px;"> Recipient Name: <span style="padding-left: 10px; font-weight: bold; "> '  . $rowTrans['ben_name'] .' </span> </div>';
$message .= '<div style="padding: 10px 0px;"> Recieving Account Number: <span style="padding-left: 10px; font-weight: bold; "> ' . $rowTrans['to_accnt'] .' </span> </div>';  
$message .= '<div style="padding: 10px 0px;"> Beneficiary Email:  <span style="padding-left: 10px; font-weight: bold; "> ' . $rowTrans['ben_email'] .' </span> </div>'; 
$message .= '<div style="padding: 10px 0px;"> Phone Number:  <span style="padding-left: 10px; font-weight: bold; "> ' . $rowTrans['ben_phn'] .' </span> </div>';   
$message .= '<div style="padding: 10px 0px;"> Bank Name:  <span style="padding-left: 10px; font-weight: bold; "> ' . $rowTrans['bank_name'] .'  </span> </div>';  
$message .= '<div style="padding: 10px 0px;"> Swift/Abba Routing Code:  <span style="padding-left: 10px; font-weight: bold; "> ' . $rowTrans['swift_code'] .' </span> </div>';  
$message .= '<div style="padding: 10px 0px;"> Amount:  <span style="padding-left: 10px; font-weight: bold; "> ' . $rowTrans['amt_trans'] .' </span> </div>';  


$message .='</div>';

$message .='</div>';

$message .= '<div style="padding:9px;">';

$message .= '<p style="color:#000066; font-size:14px; font-family: Helvetica; font-weight:400">Problems with trasaction ? </p>';

$message .= '<p style="color:#000066; font-size:14px; font-family: Helvetica; font-weight:400">You have 24 hours from the date to contact the <a href="' . dirname($_SERVER['PHP_SELF']) . '/contact">bank</a> for Reversal  </p>';

$message .= '<p style="color:rgba(0, 0, 9, 0.8); line-height: 22px; font-size:12px; font-family: Helvetica;"> Metro Bank  is a private Banking Division and is a leading provider of advisory and capital markets services to corporate and financial sponsor clients across the globe. With banking professionals across the Americas, Europe and Asia, we leverage our industry-specific expertise and regional market insight to serve the evolving needs of our clients. The deep sector knowledge of our industry coverage teams allows us to provide our clients with unique market insight on a full range of financing alternatives and strategic opportunities. Leveraging our leading institutional distribution platform, our goal is to provide our clients with solutions across all banking products, including initial public offerings, follow-on offerings, wall-crossed offerings, bought deals, private placements, ATMs, convertible offerings, leveraged loans, investment grade and high-yield debt offerings and all forms of advisory services.</p>';

$message .= '</div></div';

$message .= '</body></html>';
 

if(@mail($to, $subject, $message, $headers)){
  //echo 1; 
} else{
 // echo 0;
}

?>