I have this small vbscript to send mails through Outlook. Works fine.
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(MailItem)
myItem.SentOnBehalfOfName = "Anders Andersen"
myItem.To = "firstname.lastname@example.org"
Now I would like to modify it so that SentOnBehalfOfName and To
comes from an sql table.
The sql table has three fields 'From', 'To' and 'MailSent'.
The vbscript should loop through all records with MailSent=N.
When an e-mail has been successfully sent MailSent should be Set to Y.