From 8a215f0965e27ba6b9e62b955890f1acc9445883 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 12:20:46 +0100 Subject: shorten title when used as prefix --- inc/Mailer.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 7b09cf75e..ffacc661d 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -394,7 +394,11 @@ class Mailer { if(isset($subject)){ // add prefix to subject if(empty($conf['mailprefix'])){ - $prefix = '['.$conf['title'].']'; + if(utf8_strlen($conf['title']) < 20) { + $prefix = '['.$conf['title'].']'; + }else{ + $prefix = '['.utf8_substr($conf['title'], 0, 20).'...]'; + } }else{ $prefix = '['.$conf['mailprefix'].']'; } -- cgit v1.2.3