Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
What if a single Customer has multiple email addresses that are all opted in to communications? Although you do make a very important point, accidentally leaking email addresses is extremely undesirable. Take as much (or even more) care over a software driven email as you would when manually sending.
Change it to be - mailMessage.To.Add(string.Join(",", recipients)); Forgive me I didn't compile or run any of that code I wrote. Post another question with the revised code if you want to go over it more. Best of luck.
You need to pass a list of email addresses into that parameter, but if there is only one email address you still need to pass a list. So you could create a list and add that email.
I used the word store in a generic sense, the store might be a database, in memory store or something else. In practice I mean add a CustomerEmail class, and then store each email sent in there. Then when deciding whether to send an email you can check whether it has already been sent or not. And you will have an audit trail of the exact emails sent, including the variables.