MailMessage m = new MailMessage(); SmtpClient sc = new SmtpClient(); m.From = new MailAddress("a@dot.com", "Vijay Kumar"); string sMailIds = "a@dot.com,b@dot.com,b@dot.com"; if (sMailIds.Trim() != string.Empty) { string[] mailid = sMailIds.Split(','); try { foreach (string mail in mailid) { m.To.Add(new MailAddress(mail, "Test")); } m.Subject = "Test"; m.Body = "test"; m.IsBodyHtml = true; sc.Host = "mail.adityabirla.com"; sc.Credentials = new System.Net.NetworkCredential("abc@dot.com", "xyz"); sc.Send(m); } catch (Exception ex) { } }
mail
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)