<?php 
    /********************** Email To User *************************************************/
	$to      = $Email;
	$subject = "Hi " . $name . ", Verifikasi akaun Affiliate mybaby2you.com";
        
	$message = "
	<html>
	<head>
	<title>Hi '" . $name . "', Verifikasi akaun Affiliate mybaby2you.com</title>
	</head>
	<body>
	<p>

	Hai ".$name.",<br><br>

	Terima Kasih kerana berdaftar dengan Sistem Affiliate  mybaby2you.com<br><br>

	Ini adalah info Pendaftaran Anda :<br><br>

	Nama Penuh : ".$name."<br>
	Email : ".$Email."<br>
	Referral ID Anda : ".$ref_code."<br>

	Sila ke link di bawah untuk verifikasi:<br><br>
	https://system.mybaby2you.com/System/Page/U/Form-Verification.php?ref_code=".$ref_code." <br><br>
	</p>

	</body>
	</html>
	";
        
	// Always set content-type when sending HTML email
	$headers = "MIME-Version: 1.0" . "\r\n";
	$headers .= 'Content-type:text/html;charset=UTF-8' . "\r\n";
        
	// More headers
	$headers .= 'From: <admin@mybaby2you.com>' . "\r\n";
	$headers .= "Reply-To: admin@mybaby2you.com\r\n";
	$headers .= "Return-Path: admin@mybaby2you.com\r\n";
	$headers .= "CC: admin@mybaby2you.com\r\n";
	$headers .= "BCC: admin@mybaby2you.com\r\n";
	mail($to, $subject, $message, $headers);
	/********************** Email To User *************************************************/


	/********************** Email To Admin *************************************************/
	$email_admin = $sponsor_email;
	$name_admin = $sponsor_name;

	$to_admin      = $email_admin;
	$subject_admin = "Hi " . $name_admin . ", Pendaftaran Affiliate mybaby2you.com";
        
	$message_admin = "
	<html>
	<head>
	<title>Hi '" . $name_admin . "', Pendaftaran Affiliate mybaby2you.com</title>
	</head>
	<body>
	<p>

	Hai ".$name_admin.",<br><br>

	Terdapat satu pendaftaran Affiliate baru mybaby2you.com<br><br>

	Ini adalah info pendaftaran tersebut :<br><br>

	Nama Penuh : ".$name."<br>
	Email : ".$Email."<br>
	Referral ID : ".$ref_code."<br>

		
	</p>

	</body>
	</html>
	";       
	// Always set content-type when sending HTML email
	$headers_admin = "MIME-Version: 1.0" . "\r\n";
	$headers_admin .= 'Content-type:text/html;charset=UTF-8' . "\r\n";        
	// More headers
	$headers_admin .= 'From: <admin@mybaby2you.com>' . "\r\n";
	$headers_admin .= "Reply-To: admin@mybaby2you.com\r\n";
	$headers_admin .= "Return-Path: admin@mybaby2you.com\r\n";
	$headers_admin .= "CC: admin@mybaby2you.com\r\n";
	$headers_admin .= "BCC: admin@mybaby2you.com\r\n";
	mail($to_admin, $subject_admin, $message_admin, $headers_admin);
	/********************** Email To Admin *************************************************/

?>