diff --git a/ChangeLog b/ChangeLog index 91a2e9292..b7849ff96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-08-22 Wolfgang Sourdeau + * SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject + -contentForInlineForward]): new method that returns the content of + the message for inline forwarding based on the SOGoMailForward + templates. + * SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject -fetchMailForForwarding:sourceMail]): check the user preference for message forwarding and compose inline forwarded messages if required. diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.h b/SoObjects/Mailer/SOGoMailObject+Draft.h index ddc534adc..706e1ca80 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.h +++ b/SoObjects/Mailer/SOGoMailObject+Draft.h @@ -35,6 +35,7 @@ - (NSString *) subjectForForward; - (NSString *) filenameForForward; +- (NSString *) contentForInlineForward; @end diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index 12e9341b6..18e6e0f2f 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -22,9 +22,14 @@ #import +#import +#import #import #import +#import + +#import "SOGoMailForward.h" #import "SOGoMailObject+Draft.h" #define maxFilenameLength 64 @@ -207,6 +212,22 @@ return newSubject; } +- (NSString *) contentForInlineForward +{ + SOGoUser *currentUser; + NSString *pageName; + SOGoMailForward *page; + + currentUser = [context activeUser]; + pageName = [NSString stringWithFormat: @"SOGoMail%@Forward", + [currentUser language]]; + page = [[WOApplication application] pageWithName: pageName + inContext: context]; + [page setForwardedMail: self]; + + return [[page generateResponse] contentAsString]; +} + - (void) _fetchFileAttachmentKey: (NSDictionary *) part intoArray: (NSMutableArray *) keys withPath: (NSString *) path