Last post Feb 21, 2013 08:21 AM by wpf8
Apr 30, 2012 01:36 AM|YugJMallik|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 08:57 AM|Mikesdotnetting|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 08:21 AM|wpf8|LINK
Giva a try
MSG .NET . The API works really good and does not require Outlook.