I have found a solution here:
http://support.microsoft.com/kb/220600

The problem is that its for MFC..I dunno how to create wrapper for .net C++/CLI
I cannot add it via class wizard.
using #import produces error:

Error	1	error C2812: #import is not supported with /clr:pure and /clr:safe

I want to use automate outlook method, because sending via smtp can be really painful.
My proggy needs to be used in company's enviornment by diffrent users....I dont need them to provide passes everytime they use it.Comapany email system works on exchange...

please help!

or maybe there is other method to send emails (SMTP wont to the job at my company - they use exchange+outlook)..Thx for help in advance!

Hmmm...Dunno how to do it..when I copy/paste the code...I receive only errors. :/
I have last step to finish my program....then I will switch to C# (easier to learn...99% things I need are on the internet)..But I wasted too much time to get to the place where I am now with my C++/CLI proggy...SO I will try to finish it :/
I need to send email by:
- automating OUTLOOK (COM OBJECT) - probably it will be easier method, but I duno how to make wrapper (and generate msoutl.h) - http://support.microsoft.com/kb/220600
- using exchange directly seems to be a lot of harder - I cannot even bite it...Too much errors :/

Please help..Would be very greatful if anybody is able to help me...

Jonsca - Thx for everything :)
I gave up using cli/c++ and it was best decision I've made.
Its easier, It took me less than hour to recode my project...Compiler is faster, result files are smaller...and VStudios make it really idiot-proof :)
So from now, I will be guest of C# threads :)

For .NET it's honestly the best way to go. I saw that you had some threads over on C#. Good luck with it all.

This article has been dead for over six months. Start a new discussion instead.