Topic Path: Symbol Reference > Classes > TIdSMTP Class > TIdSMTP Methods > Expand Method
TIdSMTP.Expand Method

Determines group membership for a mailing list or mailbox alias.

procedure Expand(
    AUserName: String; 
    AResults: TIdStrings
); virtual;
Mail list or alias to be expanded.
Membership in the list or alias. 

Expand is a procedure used to determine if the argument in AUsername is a valid mailing list or mailbox alias on the server, and retrieves the email addresses for the membership of that list in AResults. 

Expand uses the SMTP EXPN command to retrieve the results, with one name and email address per line. 

The following is an example of successful result values that might be returned in AResults when using Expand with the Username 'Example-People': 


  // var
  //  IdSMTP1: TIdSMTP;
  //  AResults: TIdStringList;
  IdSMTP1.Expand('Example-People', AResults);


  Jon Postel
  Fred Fonebone
  Sam Q. Smith
  Quincy Smith <@USC-ISIF.ARPA:Q-Smith@ISI-VAXA.ARPA>


Use Verify to validate an individual name or address on the remote SMTP server (when the facility is available).

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