Outlook email issue when opened new email.. RRS feed

  • Question

  • User-543160537 posted


    I have a button on my webpage, when user clicks on that it will call the outlook app and open new email window with some text. But once it open new outlook window I cannot open inbox or any outlook items, it will block all other things in outlook...

     Outlook.Application oApp = new Outlook.Application();
                    Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);             
                    htmlbody = MessageBody;                
                    oMsg.HTMLBody = htmlbody;
                    oMsg.BodyFormat = Outlook.OlBodyFormat.olFormatHTML;              
                    oMsg.Subject = MsgSub;
                    Outlook.Recipients oRecips = (Outlook.Recipients)oMsg.Recipients;
                    Outlook.Recipient oRecip = (Outlook.Recipient)oRecips.Add(send_email_to);


    Monday, October 13, 2014 3:28 PM


  • User-821857111 posted

    Microsoft explicitly recommend against automating Outlook (or any part of Office) from web pages specifically in case of issues like this. From this page

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 13, 2014 3:39 PM