Skip to content
Snippets Groups Projects
Commit 465e809b authored by Andreas Gohr's avatar Andreas Gohr
Browse files

renamed mailfromnon to mailfromnobody, use in subscriptions

parent f7cefc02
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['
/**
* Prepare mailfrom replacement patterns
*
* Also prepares a mailfromnone config that contains an autoconstructed address
* Also prepares a mailfromnobody config that contains an autoconstructed address
* if the mailfrom one is userdependent and this might not be wanted (subscriptions)
*
* @author Andreas Gohr <andi@splitbrain.org>
......@@ -72,9 +72,9 @@ function mail_setup(){
// any replacements done? set different mailfromnone
if($from != $conf['mailfrom']){
$conf['mailfromnone'] = $noreply;
$conf['mailfromnobody'] = $noreply;
}else{
$conf['mailfromnone'] = $from;
$conf['mailfromnobody'] = $from;
}
$conf['mailfrom'] = $from;
}
......
......@@ -373,6 +373,7 @@ function subscription_send_list($subscriber_mail, $ids, $ns_id) {
* @param string $id The page or namespace id
* @param string $template The name of the mail template
*
* @return bool
* @author Adrian Lang <lang@cosmocode.de>
*/
function subscription_send($subscriber_mail, $replaces, $subject, $id, $template) {
......@@ -387,6 +388,7 @@ function subscription_send($subscriber_mail, $replaces, $subject, $id, $template
$mail->bcc($subscriber_mail);
$mail->subject($subject);
$mail->setBody($text,$trep);
$mail->from($conf['mailfromnobody']);
$mail->setHeader(
'List-Unsubscribe',
'<'.wl($id,array('do'=>'subscribe'),true,'&').'>',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment