EDIT: This question is pointless, except as an exercise in red herrings. The issue turned out to be a combination of my idiocy (NO ONE was being emailed as the hos
private string FormatMultipleEmailAddresses(string emailAddresses)
{
var delimiters = new[] { ',', ';' };
var addresses = emailAddresses.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
return string.Join(",", addresses);
}
Now you can use it like
var mailMessage = new MailMessage();
mailMessage.To.Add(FormatMultipleEmailAddresses("test@gmail.com;john@rediff.com,prashant@mail.com"));