0

Im currently working on ERP solution , languages that are yous for web application C# mvc and angulerjs. I need to generate a email and attach auto generate file and open it in outlook to allow user to edit email if needed, Code is working fine( interop.outlook.dll) on local machine after host it email load in saver side. If their is solution in office 365 it's ok too, basically I need to open outlook in client side with the auto generated email.

  • If showing the window before sending is what you're having issues figuring out, why not just use something like `Outlook.Application oApp = new Outlook.Application (); Outlook._MailItem oMailItem = (Outlook._MailItem)oApp.CreateItem ( Outlook.OlItemType.olMailItem ); oMailItem.To = address; oMailItem.Display ( true );` taken from http://stackoverflow.com/questions/6148639/how-to-open-outlook-new-mail-window-c-sharp – Disco Globeulon Oct 06 '14 at 18:50
  • I used that code before, it work fine in local host (Running in Visual Studio) but when it host in saver code it not working ! – user2837492 Oct 07 '14 at 02:41
  • at the bottom of the page --> http://forums.asp.net/t/1976130.aspx?Microsoft+Office+Interop+Outlook+dll+not+working+on+web+server+ – Disco Globeulon Oct 07 '14 at 02:51

1 Answers1

0

If you are running on the client side, "mailto:" link is the best you can do.

If you are using IE (other browser do not support COM) and your site is trusted, you can use new ActiveXObject("Outlook.Application") to create an instance of the Outlook.Application object, then use Application.CreateItem(0) and MailItem.Display() to show the message.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78