From 54f3075553a782ff5e32a5326f0e225f4437be29 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 11:54:51 +0100 Subject: mail prefix defaults to title when empty --- inc/Mailer.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 3b7762e77..7b09cf75e 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -393,12 +393,14 @@ class Mailer { if(isset($subject)){ // add prefix to subject - if($conf['mailprefix']){ + if(empty($conf['mailprefix'])){ + $prefix = '['.$conf['title'].']'; + }else{ $prefix = '['.$conf['mailprefix'].']'; - $len = strlen($prefix); - if(substr($this->headers['subject'],0,$len) != $prefix){ - $this->headers['subject'] = $prefix.' '.$this->headers['subject']; - } + } + $len = strlen($prefix); + if(substr($this->headers['subject'],0,$len) != $prefix){ + $this->headers['subject'] = $prefix.' '.$this->headers['subject']; } // encode subject -- cgit v1.2.3