My overall goal is to have 1 single "SendIntranetEmail" function in our app code that sends out all of our emails in our intranet app. Right now they are all scattered.
Ideally I would like to pass this "SendIntranetEmail" function the Subject, Body, Footer, and recipients (to, cc (optional), & bcc (optional)), and from (optional). My hang up is how to pass the "SendIntranetEmail" function a list of recipients.
We are using ASP.NET/VB and i'm pulling the email address (from SQL and LDAP) using other functions. Both of these functions return the email address in data tables. So should I pass the "SendIntranetEmail" function an array, or can I send it a MailAddressCollection and/or MailAddress. What is the best way, and how? The array I can figure out. I was just hoping there is an easier way with the MailAddress/MailAddressCollection class.
Thanks Josh
EDIT - Also, I realize i can pass in the DT to the main function and loop thru the rows. But i'm wondering if there isn't a more efficient way using the Mail class.