How to open Outlook new mail window c#

前端 未结 3 2179
被撕碎了的回忆
被撕碎了的回忆 2020-11-29 02:05

I\'m looking for a way to open a New mail in Outlook window.

I need programically fill: from, to, subject, body information, bu

3条回答
  •  醉酒成梦
    2020-11-29 02:23

    I've finally resolved the issue. Here is piece of code resolving my problem (using Outlook interops)

    Outlook.Application oApp    = new Outlook.Application ();
    Outlook._MailItem oMailItem = (Outlook._MailItem)oApp.CreateItem ( Outlook.OlItemType.olMailItem );
    oMailItem.To    = address;
    // body, bcc etc...
    oMailItem.Display ( true );
    

提交回复
热议问题