change the database settings in connectionstring as per your settings
public void SendMailToMany()
{
String ConnStr = "Data Source=ServerName;Initial Catalog=DBNamae;User ID=UserName;Password='password';";
String SQL = "SELECT Email FROM Employee "
+ "WHERE ID IS NOT NULL";
SqlDataAdapter Adpt = new SqlDataAdapter(SQL, ConnStr);
DataSet Email = new DataSet();
Adpt.Fill(Email);
string body = "this should be your message body";
MailMessage message = new MailMessage();
message.From = new MailAddress("sender@foo.bar.com");
foreach (DataRow dr in Email.Tables[0].Rows)
{
message.To.Add(new MailAddress(dr["Email"].ToString()));
}
message.Subject = "This is my subject";
message.Body = body;
SmtpClient client = new SmtpClient();
client.Send(message);
}