Indy 9
TIdEMailAddressList
Hierarchy, Properties, Methods, See Also, Unit: IdEMailAddress
Represents a collection of EMail addresses.
TIdEMailAddressList = class(TOwnedCollection)
Unit
IdEMailAddress
Description
TIdEMailAddressList is a TOwnedCollection descendant that contains a list of E-Mail addresses, or TIdEMailAddressItem object instances. TIdEMailAddressList allows Items to be added or maintained in the collection, and can be used to access the list as a TString value or in a comma delimited form which is used in many E-Mail messages.

TIdEMailAddressList is the type used to represent TIdMessage properties that can accept one or more EMail addresses, like Receipients, CCList, and BCCList.


TIdEMailAddressList.EMailAddresses
TIdEMailAddressList, See Also
Represents the contents of the collection as a comma-delimited list of email addresses.
property EMailAddresses: String;
Description
EMailAddresses is a String property that represents the contents of the collection as a comma-delimited list of email addresses in RFC 822-compliant form.

Reading EMailAddresses results in a string that contains a comma-delimited list of values for each TIdEmailAddressItem in collection.

Writing to EMailAddresses will Clear the collection, and add each parsed EMail address to the collection. Note: Group EMail addresses, delimited with the ":" (colon) and ";" (semi-colon) characters, are ignored when email addresses are added to the collection.


TIdEMailAddressList.Items
TIdEMailAddressList, See Also
Allows indexed access to email addresses in the collection.
property Items [ Index: Integer ]: TIdEMailAddressItem;
Description
Items is an indexed TIdEMailAddressItem property that allows access to TIdEMailAddressItem entries in the collection using an Integer index value. Index positions in the collection are zero-based. Accessing an index position larger than the length of the collection will raise an exception.

TIdEMailAddressList.Add
TIdEMailAddressList, See Also
Creates and returns a new Email Address item.
function Add: TIdEMailAddressItem;
Description
Add is a function that returns a new TIdEMailAddressItem which is added to the TIdEMailAddressList collection. Add calls the inherited Add method, and returns the value as a TIdEMailAddressItem object instance.

TIdEMailAddressList.Create
TIdEMailAddressList, See Also
Constructor for the object instance.
constructor Create(AOwner: TPersistent); reintroduce;
Parameters
AOwner: TPersistent
Owner of the object instance.
Description
Create is the constructor for the object instance, and is reintroduced to allow assignment of the owner of the list and the class type of the item added to the collection. Create calls the inherited constructor with AOwner and a TIdEMailAddressItem class instance parameters.

TIdEMailAddressList.FillTStrings
TIdEMailAddressList, See Also
Fills a string list with email addresses in the collection.
procedure FillTStrings(AStrings: TStrings);
Description
FillTStrings is a procedure used to fill the TStrings instance, specified by AStrings, with the formatted EMail addresses and names from the collection. Each TIdEmailAddressItem in the collection will result in a single line being added to AStrings that contains the Text value for the email address. FillTStrings does NOT clear the contents of AStrings before adding values from the collection.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.