Re: Multiple recipients

Giganews Newsgroups
Subject: Re: Multiple recipients
Posted by:  Remy Lebeau \(TeamB\) (
Date: Wed, 9 Apr 2008

"Ian Munro" <i…> wrote in message

> I now want to be able to pass in a string that contains multiple
> recipients
> that are separated by a semicolon. Obviously I can't use the following
> as the "Recipients" contains multiple addresses:
> aMessage.Recipients.Add.Address := Recipients

Use the EMailAddresses property instead:

    aMessage.Recipients.EmailAddresses := Recipients

> I had a look through the source and found a function that will split the
> string into the individual addresses saving me having to write my own
> function. It is a protected function called "SetEmailAddresses" in the
> "TIdEMailAddressList" class. Unfortunately this isn't exposed by the
> TIdMessage.Recipients property.

Yes, it is.  It is the setter method of the public EmailAddresses property,
as shown above.




In response to

Multiple recipients posted by Ian Munro on Wed, 9 Apr 2008