sogo/SoObjects/Mailer/SOGoMailReply.m

209 lines
3.7 KiB
Matlab
Raw Normal View History

/* SOGoMailReply.m - this file is part of SOGo
*
2017-12-23 11:48:31 +01:00
* Copyright (C) 2007-2017 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGExtensions/NSString+misc.h>
#import <NGImap4/NGImap4Envelope.h>
#import "SOGoMailObject+Draft.h"
#import "SOGoMailReply.h"
@implementation SOGoMailReply
- (id) init
{
if ((self = [super init]))
{
outlookMode = NO;
}
return self;
}
- (void) setOutlookMode: (BOOL) newOutlookMode
{
outlookMode = newOutlookMode;
}
- (BOOL) outlookMode
{
return outlookMode;
}
- (void) setReplyPlacement: (NSString *) newPlacement
{
replyPlacement = newPlacement;
}
- (BOOL) replyPlacementOnTop
{
return [replyPlacement isEqual: @"above"];
}
- (NSString *) messageBody
{
NSString *s, *msgid;
NSRange r;
s = [sourceMail contentForEditing];
if (s)
{
if (htmlComposition)
{
msgid = [[sourceMail envelope] messageID];
r = NSMakeRange (1, [msgid length] - 2);
msgid = [msgid substringWithRange: r];
s = [NSString stringWithFormat:
@"<blockquote type=\"cite\" cite=\"%@\">%@</blockquote>",
msgid, s];
}
else
{
s = [s stringByApplyingMailQuoting]; //adds "> " on each line
}
}
return s;
}
@end
2013-04-08 17:05:45 +02:00
@implementation SOGoMailArabicReply
@end
@implementation SOGoMailBrazilianPortugueseReply
@end
2021-08-16 19:41:24 +02:00
@implementation SOGoMailBulgarianReply
@end
@implementation SOGoMailCatalanReply
@end
@implementation SOGoMailChineseChinaReply
@end
2015-07-23 17:09:04 +02:00
@implementation SOGoMailChineseTaiwanReply
@end
2016-01-25 16:50:07 +01:00
@implementation SOGoMailCroatianReply
@end
2015-07-23 17:09:04 +02:00
@implementation SOGoMailCzechReply
@end
@implementation SOGoMailDanishReply
@end
@implementation SOGoMailDutchReply
@end
@implementation SOGoMailEnglishReply
@end
@implementation SOGoMailFinnishReply
@end
@implementation SOGoMailFrenchReply
@end
@implementation SOGoMailGermanReply
@end
2017-01-27 03:40:52 +01:00
@implementation SOGoMailHebrewReply
@end
@implementation SOGoMailHungarianReply
@end
2019-06-14 16:47:11 +02:00
@implementation SOGoMailIndonesianReply
@end
@implementation SOGoMailIcelandicReply
@end
@implementation SOGoMailItalianReply
@end
2018-06-01 17:29:33 +02:00
@implementation SOGoMailJapaneseReply
@end
2017-05-30 22:19:44 +02:00
@implementation SOGoMailLatvianReply
@end
2016-03-14 15:08:25 +01:00
@implementation SOGoMailLithuanianReply
@end
@implementation SOGoMailMacedonianReply
@end
@implementation SOGoMailMontenegrinReply
@end
@implementation SOGoMailNorwegianBokmalReply
@end
@implementation SOGoMailNorwegianNynorskReply
@end
2015-12-15 16:05:46 +01:00
@implementation SOGoMailPolishReply
@end
@implementation SOGoMailPortugueseReply
@end
2018-07-30 18:05:14 +02:00
@implementation SOGoMailRomanianReply
@end
2016-05-16 19:28:12 +02:00
@implementation SOGoMailRussianReply
@end
2016-09-14 18:13:00 +02:00
@implementation SOGoMailSerbianReply
@end
@implementation SOGoMailSerbianLatinReply
@end
2016-05-16 19:28:12 +02:00
@implementation SOGoMailSlovakReply
@end
2016-05-16 19:28:12 +02:00
@implementation SOGoMailSlovenianReply
@end
2016-05-16 19:28:12 +02:00
@implementation SOGoMailSpanishSpainReply
@end
2016-05-16 19:28:12 +02:00
@implementation SOGoMailSpanishArgentinaReply
@end
2016-05-16 19:28:12 +02:00
@implementation SOGoMailSwedishReply
@end
@implementation SOGoMailTurkishTurkeyReply
2015-07-22 22:41:37 +02:00
@end
@implementation SOGoMailUkrainianReply
@end
@implementation SOGoMailWelshReply
@end