| 1 | <?php |
| 2 | require_once 'xnet.inc.php'; |
| 3 | require_once 'lists.inc.php'; |
| 4 | |
| 5 | new_groupadmin_page('xnet/groupe/mail.tpl'); |
| 6 | $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain')); |
| 7 | $page->assign('listes', $client->get_lists()); |
| 8 | |
| 9 | if (Post::has('send')) { |
| 10 | $from = Post::get('from'); |
| 11 | $sujet = Post::get('sujet'); |
| 12 | $body = Post::get('body'); |
| 13 | |
| 14 | $mls = array_keys(Env::getMixed('ml', array())); |
| 15 | |
| 16 | require_once 'xnet/mail.inc.php'; |
| 17 | $tos = get_all_redirects(Post::has('membres'), $mls, $client); |
| 18 | send_xnet_mails($from, $sujet, $body, $tos, Post::get('replyto')); |
| 19 | $page->kill("Mail envoyé !"); |
| 20 | $page->assign('sent', true); |
| 21 | } |
| 22 | |
| 23 | $page->run(); |
| 24 | ?> |