sending data from a dataset to a email body having problems populating the body
<p>hello I'm working on a project for school any help would be great
I'm trying to email data from a dataset, but I'm having a hard time customizing the body of the email. Thank you!!!</p>

<p>what i have so far.</p>

<p>it works however i can't customize the body. For example i would like the body to populate with data from the dataset (DataSet theTask = getSpecificTaskFromEmail(emails[i]);)</p>

<p>msg.body = (row data) + ": " + " is past due";</p>

<pre><code>public void sendEmail()
        {
            try
            {            
                NetworkCredential loginInfo = new NetworkCredential("****@gmail.com", "*******");
                MailMessage msg = new MailMessage();                
                string[] emails = getEmails();         
                msg.From = new MailAddress("******@gmail.com");                
                for (int i = 0; i &lt; emails.Length; i++)
                {
                    msg.To.Add(new MailAddress(emails[i].ToString()));
                    msg.Subject = "Reminder that your Task is past Due";                    
                    DataSet theTask = getSpecificTaskFromEmail(emails[i]);
                    msg.Body = theTask.GetXmlSchema();
                    msg.IsBodyHtml = true;
                    SmtpClient client = new SmtpClient("smtp.gmail.com");
                    string userState = String.Format("Message for sent");
                    client.EnableSsl = true;
                    client.UseDefaultCredentials = false;
                    client.Credentials = loginInfo;
                    client.SendAsync(msg, userState);                 
                }           
            }
            catch (SqlException sqe)
            {
                throw sqe;
            }
            catch (Exception exes)
            {
                throw exes;
            }
        } 
</code></pre>
