Anthony Clarke

Anthony Clarke

  • NA
  • 127
  • 0

Please Help - Send Emails to All Email Addresses in Datagrid

Dec 9 2010 7:59 AM
Hi,
Just wanted put this out there to all the brainiacs because i just cant seem to do this.
I have a datagrid with columns
Date, DateNow, DateDifference, Email
 
They are all populated and i was wondering if when date difference hits 7 days it could send an email to everyone that has a date difference of 7 days or more.
 
I know how to send a single email but not how to go through the whole datagrid and do it.
Outlook.
Application oApp = new Outlook.Application();
Outlook.
MailItem email = (Outlook.MailItem)(oApp.CreateItem(Outlook.OlItemType.olMailItem));
email.Recipients.Add(textBox1.Text); //*need this for datagridview
email.Subject = "Reminder - 7 days difference;
email.Body = "7 Days Difference";
((Outlook.
MailItem)email).Send();
 
Thanks alot for your patience and time.
Regards
Anthony

Answers (2)