I have not tested this snippet to make sure it works...mainly because i think working off of an excel worksheet as database is pointless.
But anyways according to your description (not entirely clear) i think this is what you were looking for, again not tested so may have issues. You will need to add the com reference for Excel.
using Excel = Microsoft.Office.Interop.Excel;
using System.Net.Mail;
Excel.Application excel = null;
Excel.Workbook wkbk = null;
excel = new Excel.Application();
wkbk = excel.Workbooks.Open(@"c:\path\to\excel\file.xls",
true,
true,
Type.Missing,
Type.Missing,
Type.Missing,
Type.Missing,
Type.Missing,
Type.Missing,
false,
Type.Missing,
Type.Missing,
Type.Missing,
Type.Missing,
Type.Missing);
Excel.Worksheet sheet = wkbk.Sheets["Sheet1"] as Excel.Worksheet;
Excel.Range getRange = null;
if (sheet != null)
{
getRange = sheet.get_Range("A1", Type.Missing);
}
foreach (Excel.Range range in getRange)
{
string server = "YourSmtpServerHer";
int port = 25;
string authUser = "YourSmtpUsername";
string authPass = "YourSmtpPass";
string sendFrom = "send.from@email.com";
string subject = "Subject Of Your Mail";
string body = "put the body of your mail here";
string attachmentPath = @"c:\path\to\your\file\here.txt";
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient(server, port);
mail.From = new System.Net.Mail.MailAddress(sendFrom);
mail.To.Add(range.Text);
mail.Subject = subject;
mail.Body = body;
System.Net.Mail.Attachment attachment;
attachment = new System.Net.Mail.Attachment(attachmentPath);
mail.Attachments.Add(attachment);
SmtpServer.Port = port;
SmtpServer.Credentials = new System.Net.NetworkCredential(authUser, authPass);
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
}