diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m
index 709643f80..21a31e4da 100644
--- a/SoObjects/Mailer/SOGoDraftObject.m
+++ b/SoObjects/Mailer/SOGoDraftObject.m
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007-2010 Inverse inc.
+ Copyright (C) 2007-2012 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOGo.
@@ -804,8 +804,8 @@ static NSString *userAgent = nil;
- (void) fetchMailForForwarding: (SOGoMailObject *) sourceMail
{
NSDictionary *info, *attachment;
+ NSString *signature, *nl;
SOGoUserDefaults *ud;
- NSString *signature;
[sourceMail fetchCoreInfos];
@@ -831,11 +831,14 @@ static NSString *userAgent = nil;
}
else
{
- // TODO: use subject for filename?
-// error = [newDraft saveAttachment:content withName:@"forward.eml"];
+ // TODO: use subject for filename?
+ // error = [newDraft saveAttachment:content withName:@"forward.eml"];
signature = [[self mailAccountFolder] signature];
if ([signature length])
- [self setText: [NSString stringWithFormat: @"\n-- \n%@", signature]];
+ {
+ nl = (isHTML ? @"
" : @"\n");
+ [self setText: [NSString stringWithFormat: @"%@-- %@%@", nl, nl, signature]];
+ }
attachment = [NSDictionary dictionaryWithObjectsAndKeys:
[sourceMail filenameForForward], @"filename",
@"message/rfc822", @"mimetype",
diff --git a/SoObjects/Mailer/SOGoMailForward.m b/SoObjects/Mailer/SOGoMailForward.m
index c3fba3007..9beca2887 100644
--- a/SoObjects/Mailer/SOGoMailForward.m
+++ b/SoObjects/Mailer/SOGoMailForward.m
@@ -1,6 +1,6 @@
/* SOGoMailForward.m - this file is part of SOGo
*
- * Copyright (C) 2007 Inverse inc.
+ * Copyright (C) 2007-2012 Inverse inc.
*
* Author: Wolfgang Sourdeau
*
@@ -226,11 +226,15 @@
- (NSString *) signature
{
- NSString *signature, *mailSignature;
-
+ NSString *signature, *mailSignature, *nl;
+
signature = [[sourceMail mailAccountFolder] signature];
+
if ([signature length])
- mailSignature = [NSString stringWithFormat: @"-- \n%@", signature];
+ {
+ nl = (htmlComposition ? @"
" : @"\n");
+ mailSignature = [NSString stringWithFormat: @"-- %@%@", nl, signature];
+ }
else
mailSignature = @"";