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("O utlook.Applicat ion")
Set theMailItem = theApp.CreateIt em(0)
theMailItem.Rec ipients.Add you.n...@whatev er.com
theMailItem.Sub ject = "Your Subject Here"
theMailItem.Bod y = "Your message here."
theMailItem.Sen d
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.GetTypeFro mProgID("Outloo k.Application") ;
Object outlookApp = Activator.Creat eInstance(outlo okType);
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("O utlook.Applicat ion")
Set theMailItem = theApp.CreateIt em(0)
theMailItem.Rec ipients.Add you.n...@whatev er.com
theMailItem.Sub ject = "Your Subject Here"
theMailItem.Bod y = "Your message here."
theMailItem.Sen d
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.GetTypeFro mProgID("Outloo k.Application") ;
Object outlookApp = Activator.Creat eInstance(outlo okType);
Any ideas on how to convert the rest of the script?
Thanks
Comment