Re: Multiple recipients

Giganews Newsgroups
Subject: Re: Multiple recipients
Posted by:  Ian Munro (i…
Date: Wed, 9 Apr 2008

    I've found the correct property. I can use the following:

aMessage.Recipients.EMailAddresses := Recipients ;

    The problem I see now is that if I set the "Recipients" string to
contain two addresses, the second one overwrites the first so that I only
send one mail :o( Has the function been fixed in a newer release of the code
? The comments at the top of the unit are dated 2001.


"Ian Munro" <i…> wrote in message
> Hi, I'm using Delphi 7 and Indy 9.
> With the smtp Client I'm using a TIdMessage control and setting the
> Recipients property with a single address and all works well. 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
> 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. Is this the correct function to be using ?
> Ian


In response to

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