Here is my code to send the email in Outlook 2013:
public void GenerateEmail(OutEmail outEmail)
{
var objOutlook = new
try below mentioned
mailItem.GetInspector.Activate();
var signature = mailItem.HTMLBody;
mailItem.HTMLBody = EmailBody + signature;
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.