diff --git a/NEWS b/NEWS index d89502ed9..39c2455c9 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,7 @@ Bug fixes - [web] fixed handling of public access rights of Calendars (#4344) - [web] fixed server-side CSS sanitization of messages (#4366) - [web] cards list not accessible when changing address book in expanded card view + - [web] added missing subject to junk/not junk reports - [eas] hebrew folders encoding problem using EAS (#4240) - [eas] avoid sync requests for shared folders every second (#4275) diff --git a/SoObjects/Mailer/English.lproj/Localizable.strings b/SoObjects/Mailer/English.lproj/Localizable.strings index b761e0ada..14f57677b 100644 --- a/SoObjects/Mailer/English.lproj/Localizable.strings +++ b/SoObjects/Mailer/English.lproj/Localizable.strings @@ -1,2 +1,5 @@ "OtherUsersFolderName" = "Other Users"; "SharedFoldersName" = "Shared Folders"; + +"Report: Marked messages as junk" = "Report: Marked messages as junk"; +"Report: Marked messages as not junk" = "Report: Marked messages as not junk"; \ No newline at end of file diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index 3852941bd..41bd79e3b 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -795,7 +795,7 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) junk: (BOOL) isJunk { NSDictionary *junkSettings; - NSString *recipient; + NSString *recipient, *subject; NSException *error; unsigned int limit; @@ -805,9 +805,15 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) if ([[junkSettings objectForKey: @"vendor"] caseInsensitiveCompare: @"generic"] == NSOrderedSame) { if (isJunk) - recipient = [junkSettings objectForKey: @"junkEmailAddress"]; + { + recipient = [junkSettings objectForKey: @"junkEmailAddress"]; + subject = [[self labelForKey: @"Report: Marked messages as junk"] asQPSubjectString: @"utf-8"]; + } else - recipient = [junkSettings objectForKey: @"notJunkEmailAddress"]; + { + recipient = [junkSettings objectForKey: @"notJunkEmailAddress"]; + subject = [[self labelForKey: @"Report: Marked messages as not not junk"] asQPSubjectString: @"utf-8"]; + } limit = [[junkSettings objectForKey: @"limit"] intValue]; @@ -837,11 +843,12 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) // a new mail message if ((i%limit) == 0) { - map = [NGMutableHashMap hashMapWithCapacity: 5]; + map = [NGMutableHashMap hashMapWithCapacity: 6]; #warning SOPE is just plain stupid here - if you change the case of keys, it will break the encoding of fields [map setObject: @"multipart/mixed" forKey: @"content-type"]; [map setObject: @"1.0" forKey: @"MIME-Version"]; + [map setObject: subject forKey: @"subject"]; [map setObject: [[identities objectAtIndex: 0] objectForKey: @"email"] forKey: @"from"]; [map setObject: recipient forKey: @"to"]; [map setObject: [[NSCalendarDate date] rfc822DateString] forKey: @"date"];