Support for configurable e-mail return path

This commit is contained in:
Lukas Rademacher 2017-10-28 22:24:54 +02:00
parent e1c5b79f58
commit 5f43dcf497
6 changed files with 8 additions and 0 deletions

View File

@ -108,6 +108,7 @@ $conf['subscribe_time'] = 24*60*60; //Time after which digests / lists are
$conf['notify'] = ''; //send change info to this email (leave blank for nobody)
$conf['registernotify'] = ''; //send info about newly registered users to this email (leave blank for nobody)
$conf['mailfrom'] = ''; //use this email when sending mails
$conf['mailreturnpath'] = ''; //use this email as returnpath for bounce mails
$conf['mailprefix'] = ''; //use this as prefix of outgoing mails
$conf['htmlmail'] = 1; //send HTML multipart mails

View File

@ -54,6 +54,9 @@ class Mailer {
$this->allowhtml = (bool)$conf['htmlmail'];
// add some default headers for mailfiltering FS#2247
if(!empty($conf['mailreturnpath'])) {
$this->setHeader('Return-Path', $conf['mailreturnpath']);
}
$this->setHeader('X-Mailer', 'DokuWiki');
$this->setHeader('X-DokuWiki-User', $INPUT->server->str('REMOTE_USER'));
$this->setHeader('X-DokuWiki-Title', $conf['title']);

View File

@ -119,6 +119,7 @@ $lang['subscribe_time'] = 'Zeit nach der Zusammenfassungs- und Änderungs
$lang['notify'] = 'Sende Änderungsbenachrichtigungen an diese E-Mail-Adresse.';
$lang['registernotify'] = 'Sende Information bei neu registrierten Benutzern an diese E-Mail-Adresse.';
$lang['mailfrom'] = 'Absenderadresse für automatisch erzeugte E-Mails';
$lang['mailreturnpath'] = 'Empfänger-E-Mail-Adresse für Unzustellbarkeitsnachricht';
$lang['mailprefix'] = 'Präfix für E-Mail-Betreff beim automatischen Versand von Benachrichtigungen';
$lang['htmlmail'] = 'Versendet optisch angenehmere, aber größere E-Mails im HTML-Format (multipart). Deaktivieren, um Text-Mails zu versenden.';
$lang['sitemap'] = 'Erzeuge Google Sitemaps (Tage)';

View File

@ -127,6 +127,7 @@ $lang['subscribe_time'] = 'Zeit nach der Zusammenfassungs- und Änderungs
$lang['notify'] = 'Änderungsmitteilungen an diese E-Mail-Adresse versenden';
$lang['registernotify'] = 'Information über neu registrierte Benutzer an diese E-Mail-Adresse senden';
$lang['mailfrom'] = 'Absender-E-Mail-Adresse für automatische Mails';
$lang['mailreturnpath'] = 'Empfänger-E-Mail-Adresse für Unzustellbarkeitsnachricht';
$lang['mailprefix'] = 'Präfix für E-Mail-Betreff beim automatischen Versand von Benachrichtigungen (Leer lassen um den Wiki-Titel zu verwenden)';
$lang['htmlmail'] = 'Versendet optisch angenehmere, aber größere E-Mails im HTML-Format (multipart). Deaktivieren, um Text-Mails zu versenden.';
$lang['sitemap'] = 'Google Sitemap erzeugen (Tage). Mit 0 deaktivieren.';

View File

@ -142,6 +142,7 @@ $lang['subscribe_time'] = 'Time after which subscription lists and digests are s
$lang['notify'] = 'Always send change notifications to this email address';
$lang['registernotify'] = 'Always send info on newly registered users to this email address';
$lang['mailfrom'] = 'Sender email address to use for automatic mails';
$lang['mailreturnpath'] = 'Recipient email address for non delivery notifications';
$lang['mailprefix'] = 'Email subject prefix to use for automatic mails. Leave blank to use the wiki title';
$lang['htmlmail'] = 'Send better looking, but larger in size HTML multipart emails. Disable for plain text only mails.';

View File

@ -189,6 +189,7 @@ $meta['subscribe_time'] = array('numeric');
$meta['notify'] = array('email', '_multiple' => true);
$meta['registernotify'] = array('email', '_multiple' => true);
$meta['mailfrom'] = array('email', '_placeholders' => true);
$meta['mailreturnpath'] = array('email', '_placeholders' => true);
$meta['mailprefix'] = array('string');
$meta['htmlmail'] = array('onoff');