<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$mailer->addHeader('Reply-To', $replyto);
}
$mailer->setTxtBody(wordwrap($text, 72));
-// $mailer->send();
+ $mailer->send();
}
// }}}
// {{{ send_xnet_mails
-function send_xnet_mails($from, $sujet, $body, $tos, $replyto = null)
+function send_xnet_mails($from, $sujet, $body, $tos, $replyto = null, $attach = null)
{
global $globals;
$sent = array();
$mailer = new PlMailer();
$mailer->setSubject($sujet);
$mailer->setFrom($from);
+ if (is_uploaded_file($attach['tmp_name'])) {
+ $mailer->addAttachment($attach['tmp_name'],
+ $attach['type'],
+ $attach['name']);
+ }
foreach ($tos as $user) {
if ($sent[$user['email']]) continue;