diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-04-15 13:25:05 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-04-15 13:25:05 +0200 |
commit | 2398a2b54196667d6659d3d0489212b271c43703 (patch) | |
tree | 3510bf81289d4c93f1c801fb270a9db01ec0d926 /inc/Mailer.class.php | |
parent | 052b2a1780ce07c45e80cd16a55e43177850de35 (diff) | |
download | rpg-2398a2b54196667d6659d3d0489212b271c43703.tar.gz rpg-2398a2b54196667d6659d3d0489212b271c43703.tar.bz2 |
made it possible to disable HTML mails in the config
Diffstat (limited to 'inc/Mailer.class.php')
-rw-r--r-- | inc/Mailer.class.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 9744fa44e..f04cdd3e2 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -26,6 +26,7 @@ class Mailer { private $sendparam= null; private $validator = null; + private $allowhtml = true; /** * Constructor @@ -43,6 +44,8 @@ class Mailer { $listid = join('.',array_reverse(explode('/',DOKU_BASE))).$server; $listid = strtolower(trim($listid,'.')); + $this->allowhtml = (bool) $conf['htmlmail']; + // add some default headers for mailfiltering FS#2247 $this->setHeader('X-Mailer','DokuWiki '.getVersion()); $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']); @@ -434,6 +437,11 @@ class Mailer { protected function prepareBody(){ global $conf; + // no HTML mails allowed? remove HTML body + if(!$this->allowhtml){ + $this->html = ''; + } + // check for body if(!$this->text && !$this->html){ return false; |