mail.php 951 B

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