diff options
author | Anika Henke <anika@selfthinker.org> | 2012-06-29 17:51:09 +0100 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2012-06-29 17:51:09 +0100 |
commit | 0c06a181819249c6a4a2a6c60e13f739df1f2253 (patch) | |
tree | 859377c572d0acbfc520b02304ef515bf3aebbe0 /inc/subscription.php | |
parent | ef7e36e4fd2a168977754f0aac1d855fb651f104 (diff) | |
parent | 5d0aaf958325f500ce69cfb79e69eb0d8f83fdeb (diff) | |
download | rpg-0c06a181819249c6a4a2a6c60e13f739df1f2253.tar.gz rpg-0c06a181819249c6a4a2a6c60e13f739df1f2253.tar.bz2 |
Merge branch 'master' of github.com:splitbrain/dokuwiki into frontend_improvements
Conflicts:
lib/tpl/dokuwiki/css/basic.css
Diffstat (limited to 'inc/subscription.php')
-rw-r--r-- | inc/subscription.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/inc/subscription.php b/inc/subscription.php index c94f17ad0..d1ee0397a 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -377,18 +377,20 @@ 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); + $mail->setHeader( + 'List-Unsubscribe', + '<'.wl($id,array('do'=>'subscribe'),true,'&').'>', + false + ); + return $mail->send(); } |