C
CJ
Hi
I'm trying to send email via a c# app, and I've come across various
ways to do it, but the way that seems best given my constraints is this
little vbscript:
Dim theApp, theNameSpace, theMailItem
set theApp = CreateObject("Outlook.Application")
Set theMailItem = theApp.CreateItem(0)
theMailItem.Recipients.Add (e-mail address removed)
theMailItem.Subject = "Your Subject Here"
theMailItem.Body = "Your message here."
theMailItem.Send
So I'm trying to convert this to C#, but I'm stuck since I don't know
how to get the type of theMailItem. This is as far as I've got:
Type outlookType = Type.GetTypeFromProgID("Outlook.Application");
Object outlookApp = Activator.CreateInstance(outlookType);
Any ideas on how to convert the rest of the script?
Thanks
I'm trying to send email via a c# app, and I've come across various
ways to do it, but the way that seems best given my constraints is this
little vbscript:
Dim theApp, theNameSpace, theMailItem
set theApp = CreateObject("Outlook.Application")
Set theMailItem = theApp.CreateItem(0)
theMailItem.Recipients.Add (e-mail address removed)
theMailItem.Subject = "Your Subject Here"
theMailItem.Body = "Your message here."
theMailItem.Send
So I'm trying to convert this to C#, but I'm stuck since I don't know
how to get the type of theMailItem. This is as far as I've got:
Type outlookType = Type.GetTypeFromProgID("Outlook.Application");
Object outlookApp = Activator.CreateInstance(outlookType);
Any ideas on how to convert the rest of the script?
Thanks