<?php
/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: mail_tell_a_friend.php 10954 2009-01-12 05:26:27Z liguode $
*/

include_once('../common.php');

//是否关闭站点
checkclose();

//是否公开
if(empty($_SCONFIG['networkpublic'])) {
	checklogin();
}
$email = $list = array();
if ( isset( $_POST['friend_email'] ) && $_POST['friend_email'] != '' )
{
	include_once(S_ROOT.'./source/function_sendmail.php');
	$mailsubject = htmlspecialchars($_POST['subject']);
	$mailmessage = htmlspecialchars($_POST['message']).'\r\n';
	$youremail = htmlspecialchars($_POST['your_email']);
	$email = explode(" ", $_POST['friend_email']);
	if ( $email )
	{
		foreach ( $email as $key )
		{
			if ( isemail( $key ) )
			{
				sendmail($key, $mailsubject, $mailmessage,$youremail);
			}
		}
	}
	echo 'mail send successfully';
}
?>