private bool EmailAddressesMatch(EmailAddressCollection emailAddresses, string recipient) { if (emailAddresses == null) { return(false); } return (emailAddresses.Any( address => address.Address.Equals(recipient, StringComparison.InvariantCultureIgnoreCase) || address.Name.Equals(recipient, StringComparison.InvariantCultureIgnoreCase))); }