1<?php
2
3/*
4	[UCenter] (C)2001-2099 Comsenz Inc.
5	This is NOT a freeware, use is subject to license terms
6
7	$Id: mail.php 1059 2011-03-01 07:25:09Z monkey $
8*/
9
10!defined('IN_UC') && exit('Access Denied');
11
12class mailcontrol extends base {
13
14	function __construct() {
15		$this->mailcontrol();
16	}
17
18	function mailcontrol() {
19		parent::__construct();
20		$this->init_input();
21	}
22
23	function onadd() {
24		$this->load('mail');
25		$mail = array();
26		$mail['appid']		= UC_APPID;
27		$mail['uids']		= explode(',', $this->input('uids'));
28		$mail['emails']		= explode(',', $this->input('emails'));
29		$mail['subject']	= $this->input('subject');
30		$mail['message']	= $this->input('message');
31		$mail['charset']	= $this->input('charset');
32		$mail['htmlon']		= intval($this->input('htmlon'));
33		$mail['level']		= abs(intval($this->input('level')));
34		$mail['frommail']	= $this->input('frommail');
35		$mail['dateline']	= $this->time;
36		return $_ENV['mail']->add($mail);
37	}
38
39}
40
41?>