closes #376
[platal.git] / htdocs.net / groupe / mail.php
CommitLineData
0337d704 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
0337d704 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()));
0337d704 15
16 require_once 'xnet/mail.inc.php';
4370c7eb 17 $tos = get_all_redirects(Post::has('membres'), $mls, $client);
9898b36e 18 send_xnet_mails($from, $sujet, $body, $tos, Post::get('replyto'));
0337d704 19 $page->kill("Mail envoyé !");
20 $page->assign('sent', true);
21 }
22
23 $page->run();
24?>