Multiple recipients

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

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 ?