summaryrefslogtreecommitdiff
path: root/inc/subscription.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-11-12 17:50:47 +0100
committerAndreas Gohr <andi@splitbrain.org>2011-11-12 17:50:47 +0100
commitd7169d19cde6fc49e27e7444e424549212339ff9 (patch)
tree50e43e13dd1bbc0e1a079908d37bc19e5cef1325 /inc/subscription.php
parent6df843ee8dd8133de3e4e8d5cb742d2afa5f6761 (diff)
downloadrpg-d7169d19cde6fc49e27e7444e424549212339ff9.tar.gz
rpg-d7169d19cde6fc49e27e7444e424549212339ff9.tar.bz2
Replaced mail_send calls with new Mailer class
Diffstat (limited to 'inc/subscription.php')
-rw-r--r--inc/subscription.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/inc/subscription.php b/inc/subscription.php
index c94f17ad0..e9f17bc28 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -377,18 +377,16 @@ function subscription_send_list($subscriber_mail, $ids, $ns_id) {
*/
function subscription_send($subscriber_mail, $replaces, $subject, $id, $template) {
global $conf;
+ global $lang;
$text = rawLocale($template);
- $replaces = array_merge($replaces, array('TITLE' => $conf['title'],
- 'DOKUWIKIURL' => DOKU_URL,
- 'PAGE' => $id));
-
- foreach ($replaces as $key => $substitution) {
- $text = str_replace('@'.strtoupper($key).'@', $substitution, $text);
- }
+ $trep = array_merge($replaces, array('PAGE' => $id));
- global $lang;
$subject = $lang['mail_' . $subject] . ' ' . $id;
- mail_send('', '['.$conf['title'].'] '. $subject, $text,
- $conf['mailfrom'], '', $subscriber_mail);
+ $mail = new Mailer();
+ $mail->bcc($subscriber_mail);
+ $mail->subject($subject);
+ $mail->setBody($text,$trep);
+
+ return $mail->send();
}