Merge pull request #333 from tfux/5640

fix(eas) improvement for bug #5612 (fixes #5640)
This commit is contained in:
WoodySlum (Le Programmeur)
2022-11-14 09:03:46 +01:00
committed by GitHub

View File

@@ -40,8 +40,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- (NSArray *) allRecipients
{
NGMailAddressParser *parser;
NSEnumerator *addressList;
NSMutableArray *allRecipients;
NSArray *recipients;
NGMailAddress *address;
NSEnumerator *recipients;
NSString *s;
NSString *fieldNames[] = {@"to", @"cc", @"bcc"};
unsigned int count;
@@ -49,9 +53,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
for (count = 0; count < 3; count++)
{
recipients = [self headersForKey: fieldNames[count]];
if ([recipients count] > 0)
[allRecipients addObjectsFromArray: recipients];
recipients = [[self headersForKey: fieldNames[count]] objectEnumerator];
while ((s = [recipients nextObject]))
{
parser = [NGMailAddressParser mailAddressParserWithString: s];
addressList = [[parser parseAddressList] objectEnumerator];
while ((address = [addressList nextObject]))
[allRecipients addObject: [address address]];
}
}
return allRecipients;