Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 21, 2013 12:21 PM by wpf8
Apr 30, 2012 05:36 AM|LINK
I want to create a .msg file in C#. The below code works find when outlook is installed in the Machine and referring Microsoft.office.interop.outlook.dll. But failed in windows server, where outlook is not installed.
Application outlookApp = new Application();
MailItem mailitm = (MailItem)outlookApp.CreateItem(OlItemType.olMailItem);
mailitm.Subject = "Test for MSG";
mailitm.Body = "Sample Body";
MailMessage msg = new MailMessage();
Is there anyway i can do it? May be without using outlook components or installing only .dll in the server.
Apr 30, 2012 12:57 PM|LINK
You can't use Outlook interop unless Outlook is installed, as you have already discovered. Probably your only option is to use a third party component such as Aspose Email (although it isn't cheap): http://www.aspose.com/categories/.net-components/aspose.email-for-.net/default.aspx
Google might help you find a lower cost/free one.
Feb 21, 2013 12:21 PM|LINK
Giva a try
MSG .NET . The API works really good and does not require Outlook.