TEmailAddressList - how to add a address

Giganews Newsgroups
Subject: TEmailAddressList - how to add a address
Posted by:  Simon M (meggl…@tbk-patent.de)
Date: Tue, 10 Feb 2004

Hello,
i'm simon and new to this group. I'm programming in delphi7 and Indy 9.

I'm trying to add an addresslistItem to the addressList of vidmessage. But
the way I do doesn't work:

var    vEAI : TIdEMailAddressItem;
        vIdmessage : TIdMessage;
begin
    vIdMessage :? TIdMessage.create(self);
    vEAI := TIdEMailAddressItem.Create(vIdmessage.Recipients);
    vIdMessage.Recipients.Add;
    vIdMessage.Recipients.Items[vMessage.Recipients.Count-1] := vEAI;
  end;
end;

Isn't there a function like
<pseudo>
      vIdMessage.Recipients.Items.Add(Name; Address)
</pseudo>

Thanks in advance!
Simon

Replies