Topic Path: Symbol Reference > Classes > TIdEMailAddressList Class > TIdEMailAddressList Methods > AddressesByDomain Method
TIdEMailAddressList.AddressesByDomain Method

Gathers a list of email addresses in the collection having the specified Domain value.

procedure AddressesByDomain(
    AList: TIdEMailAddressList; 
    const ADomain: string
List of email address with the specified Domain value.
Domain value to use for inclusion in the list of email addresses. 

AddressesByDomain is a method used to gather a list of email addresses in the collection having the value specified in ADomain in the Domain property for the collection items. 

AList is used to store any collection items in the list that match the domain specified in the ADomain argument. The collection specified in AList is cleared prior to gathering TIdEmailAddressItem instances in the collection. 

ADomain is the host Domain value in TIdEmailAddressItem instances in the collection to include in the AList argument. The value specified in ADomain is case-insensitive; all comparisions are performed using the lower-case equivalent of the Domain property in the collection items. 

AddressesByDomain iterates over the items in the collection. When a collection item is found that has the specified value in its' Domain property, a corresponding TIdEmailAddressItem item is created in the AList collection. 

Use SortByDomain to order the current collection using the value of the Domain property stored in each of the the collection items. 

Use EmailAddresses to access a comma-delimited list that represents all email addresses in the collection regardless of their Domain. 

Use FillTStrings to populate a TIdStrings instance with the textual version of all email addresses in the collection regardless of their Domain.






Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.