I am using the below code, and it only sends one email - I have to send the email to multiple addresses.
For getting more than one email I use:
strin
To send to multiple recipients I set up my recipient string with a comma as my separator.
string recipient = "foo@bar.com,foo2@bar.com,foo3@bar.com";
Then to add the recipients to the MailMessage
object:
string[] emailTo = recipient.Split(',');
for (int i = 0; i < emailTo.GetLength(0); i++)
mailMessageObject.To.Add(emailTo[i]);