summaryrefslogtreecommitdiff
path: root/inc/Mailer.class.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-11-12 12:20:46 +0100
committerAndreas Gohr <andi@splitbrain.org>2011-11-12 12:20:46 +0100
commit8a215f0965e27ba6b9e62b955890f1acc9445883 (patch)
tree434e6b984fd3982c33106131dc6dfc851d34cfcb /inc/Mailer.class.php
parent54f3075553a782ff5e32a5326f0e225f4437be29 (diff)
downloadrpg-8a215f0965e27ba6b9e62b955890f1acc9445883.tar.gz
rpg-8a215f0965e27ba6b9e62b955890f1acc9445883.tar.bz2
shorten title when used as prefix
Diffstat (limited to 'inc/Mailer.class.php')
-rw-r--r--inc/Mailer.class.php6
1 files changed, 5 insertions, 1 deletions
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'].']';
}