Do you really need to store the email addresses in hidden textboxes? Do they have to be on the client at all? The logic could do this on server side without having to make a round via the client. Theory:
List<string> recipients = new List<string>();
if (checkbox1.Checked)
recipients.Add("user1@somedomain.com");
if (checkbox2.Checked)
recipients.Add("user2@somedomain.com");
if (checkbox3.Checked)
recipients.Add("user3@somedomain.com");
Of course this information could be kept in a database and the checks could be performed in a loop, but my example was just to give you the idea.
Is there a pattern for who gets to be in the To: field and who gets the Bcc: field? Otherwise, it is very easy to dynamically populate recipients regarding on which checkboxes are checked. Given the previous code, you could add the recipients with one line of code:
mail.To.Add(String.Join(",", recipients.ToArray());
If this post was useful to you, please mark it as answer. Thank you!