C# - How to include Outlook signature in an email that contains images?

前端 未结 2 1764
说谎
说谎 2021-01-24 19:11

Here is my code to send the email in Outlook 2013:

public void GenerateEmail(OutEmail outEmail)
{
    var objOutlook = new         


        
2条回答
  •  耶瑟儿~
    2021-01-24 19:35

    Outlook inserts the signature when you call MailItem.Display or access MailItem.GetInspector (you do not have to do anything with the returned object).

    If you want to programmatically insert a signature, Redemption exposes RDOSignature object which implements ApplyTo method.

    UPDATE: as of the latest (Summer 2017) builds of Outlook, GetInspector trick no longer works. Now only MailItem.Display adds the signature to an unmodified message.

提交回复
热议问题