Internet Direct (Indy)
Home
PreviousUpNext
TIdSMTP.Expand Method

Determines group membership for a mailing list or mailbox alias.

Pascal
procedure Expand(
    AUserName: String; 
    AResults: TIdStrings
); virtual;
Parameters 
Description 
AUserName 
Mail list or alias to be expanded.
 
AResults 
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).

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.