fixed sending mails to multiple recipients over AS
This commit is contained in:
parent
8ba031d6ec
commit
f52a083326
|
@ -33,14 +33,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#import <Foundation/NSEnumerator.h>
|
#import <Foundation/NSEnumerator.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
|
#import <NGMail/NGMailAddress.h>
|
||||||
|
#import <NGMail/NGMailAddressParser.h>
|
||||||
|
|
||||||
#import <SOGo/NSString+Utilities.h>
|
#import <SOGo/NSString+Utilities.h>
|
||||||
|
|
||||||
@implementation NGMimeMessage (ActiveSync)
|
@implementation NGMimeMessage (ActiveSync)
|
||||||
|
|
||||||
- (NSArray *) allRecipients
|
- (NSArray *) allRecipients
|
||||||
{
|
{
|
||||||
|
NSEnumerator *enumerator, *addressList;
|
||||||
NSMutableArray *recipients;
|
NSMutableArray *recipients;
|
||||||
NSEnumerator *enumerator;
|
NGMailAddressParser *parser;
|
||||||
|
NGMailAddress *address;
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
|
||||||
recipients = [NSMutableArray array];
|
recipients = [NSMutableArray array];
|
||||||
|
@ -48,13 +53,21 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
enumerator = [[self headersForKey: @"to"] objectEnumerator];
|
enumerator = [[self headersForKey: @"to"] objectEnumerator];
|
||||||
while ((s = [enumerator nextObject]))
|
while ((s = [enumerator nextObject]))
|
||||||
{
|
{
|
||||||
[recipients addObject: [s pureEMailAddress]];
|
parser = [NGMailAddressParser mailAddressParserWithString: s];
|
||||||
|
addressList = [[parser parseAddressList] objectEnumerator];
|
||||||
|
|
||||||
|
while ((address = [addressList nextObject]))
|
||||||
|
[recipients addObject: [address address]];
|
||||||
}
|
}
|
||||||
|
|
||||||
enumerator = [[self headersForKey: @"cc"] objectEnumerator];
|
enumerator = [[self headersForKey: @"cc"] objectEnumerator];
|
||||||
while ((s = [enumerator nextObject]))
|
while ((s = [enumerator nextObject]))
|
||||||
{
|
{
|
||||||
[recipients addObject: [s pureEMailAddress]];
|
parser = [NGMailAddressParser mailAddressParserWithString: s];
|
||||||
|
addressList = [[parser parseAddressList] objectEnumerator];
|
||||||
|
|
||||||
|
while ((address = [addressList nextObject]))
|
||||||
|
[recipients addObject: [address address]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return recipients;
|
return recipients;
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -10,7 +10,7 @@ Enchancements
|
||||||
- force default classification over CalDAV if none is set (#2326)
|
- force default classification over CalDAV if none is set (#2326)
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
-
|
- fixed sending mails to multiple recipients over AS
|
||||||
|
|
||||||
2.2.8 (2014-09-10)
|
2.2.8 (2014-09-10)
|
||||||
------------------
|
------------------
|
||||||
|
|
Loading…
Reference in a new issue