1
I have a class to send email, which works perfectly for only one recipient, but I need to send it to several people, I made a select that searches the necessary emails and puts the ";". But when I try to send this way, it returns the error "An invalid character was found in the email header: ';'." I tried to put "," returns the same error.
I tried to do so:
var listaEmail = emailDestinatario;
var emails = listaEmail.Split(',');
foreach (var endereco in emails)
{
email.To.Add(endereco);
}
It does not return error, but also does not send the emails. Any suggestions?
https://stackoverflow.com/questions/23484503/sending-email-to-multiple-recipients-with-mailmessage
– user60252
What is the value of:
listaEmail
?– Aline