* Xnet :
- #334: Interface improvements. -Car
- #341: Improve member deletion. -MC
+ - #376: Reply-To on the mail form. -MC
- * User Interface:
+ * User Interface :
- #338: Broken FSF link fixed on donation page. -CAT
- #339: New RSS links that allow direct and easier RSS activation. -CAT
- #130: Each page now shows a different title. -CAT
require_once 'xnet/mail.inc.php';
$tos = get_all_redirects(Post::has('membres'), $mls, $client);
- send_xnet_mails($from, $sujet, $body, $tos);
+ send_xnet_mails($from, $sujet, $body, $tos, Post::get('replyto'));
$page->kill("Mail envoyé !");
$page->assign('sent', true);
}
// }}}
// {{{ _send_xnet_mail
-function _send_xnet_mail($user, $body, $mailer)
+function _send_xnet_mail($user, $body, $mailer, $replyto = null)
{
$cher = isset($user['sexe']) ? ($user['sexe'] ? 'Chère' : 'Cher') : 'Cher(e)';
$nom = isset($user['nom']) ? $user['nom'] : "";
$text = preg_replace('!<prenom>!i', $pnom, $text);
$mailer->addHeader('To', $to);
+ if ($replyto) {
+ $mailer->addHeader('Reply-To', $replyto);
+ }
$mailer->setTxtBody(wordwrap($text, 72));
$mailer->send();
}
// }}}
// {{{ send_xnet_mails
-function send_xnet_mails($from, $sujet, $body, $tos)
+function send_xnet_mails($from, $sujet, $body, $tos, $replyto = null)
{
$sent = array();
foreach ($tos as $user) {
if ($sent[$user['email']]) continue;
- _send_xnet_mail($user, $body, $mailer);
+ _send_xnet_mail($user, $body, $mailer, $replyto);
$sent[$user['email']] = true;
}
}
value="{if $smarty.request.from}{$smarty.request.from}{else}"{$smarty.session.prenom} {$smarty.session.nom}" <{$smarty.session.bestalias}@polytechnique.org>{/if}" />
</td>
</tr>
+ <tr>
+ <td class="titre">Reply-To :</td>
+ <td>
+ <input type="text" name="replyto" size="55" maxlength="70" value="{$smarty.request.replyto}" />
+ </td>
+ </tr>
<tr>
<th colspan="2">Destinataires</th>