mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
@@ -40,8 +40,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
- (NSArray *) allRecipients
|
- (NSArray *) allRecipients
|
||||||
{
|
{
|
||||||
|
NGMailAddressParser *parser;
|
||||||
|
NSEnumerator *addressList;
|
||||||
NSMutableArray *allRecipients;
|
NSMutableArray *allRecipients;
|
||||||
NSArray *recipients;
|
NGMailAddress *address;
|
||||||
|
NSEnumerator *recipients;
|
||||||
|
NSString *s;
|
||||||
NSString *fieldNames[] = {@"to", @"cc", @"bcc"};
|
NSString *fieldNames[] = {@"to", @"cc", @"bcc"};
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
@@ -49,9 +53,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
for (count = 0; count < 3; count++)
|
for (count = 0; count < 3; count++)
|
||||||
{
|
{
|
||||||
recipients = [self headersForKey: fieldNames[count]];
|
recipients = [[self headersForKey: fieldNames[count]] objectEnumerator];
|
||||||
if ([recipients count] > 0)
|
while ((s = [recipients nextObject]))
|
||||||
[allRecipients addObjectsFromArray: recipients];
|
{
|
||||||
|
parser = [NGMailAddressParser mailAddressParserWithString: s];
|
||||||
|
addressList = [[parser parseAddressList] objectEnumerator];
|
||||||
|
while ((address = [addressList nextObject]))
|
||||||
|
[allRecipients addObject: [address address]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return allRecipients;
|
return allRecipients;
|
||||||
|
|||||||
Reference in New Issue
Block a user