access to Message-ID header in Outlook 2010 mail item? - outlook

i want to create Outlook 2010's add-in for send Message-Id Header of selected message to my application, how to access to Message-ID header in Outlook 2010 mail item?

Read the PR_INTERNET_MESSAGE_ID property (DASL name http://schemas.microsoft.com/mapi/proptag/0x1035001F) using MailItem.PropertyAccessor.GetProperty().

Related

Get browser URL in an outlook add-in

I am developing an outlook add-in that requires to save email location. For that, I want to get the browser URL corresponding to the opened email . How do I get the outlook host window's URL from the outlook add-in? Is there any method to save email location?
window.location gives me the location of my add-in not that of the browser.
You can use the graph API to get the item's link using the weblink property. Details are here in this link. https://learn.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0

How to Outlook Reply with attachment c#

When I reply to incoming mail, attachs are deleted. How do I add attachments to new mail with vsto addin?
Do you mean the original email attachments are removed from the new item? Why is it a problem? That is the expected behavior. Note that embedded images attachments are copied to the new message.
You can save the original attachments by looping through the MailItem.Attachments collection and calling Attachment.SaveAsFile. You can then add the attachments to the new message by calling MailItem.Attachments.Add.

Is there a way to find an email message from Outlook inbox via InternetMessageId via C#?

I have an InternetMessageID for an email item. I'd like to open a Reply email dialog to an email with this InternetMessageID. How can I find the email from Outlook API by InternetMessageID?
Internet message id as in "Message-ID" MIME header? Use Items.Find/FindNext or Items.Restrict to search for the PR_INTERNET_MESSAGE_ID (DASL name http://schemas.microsoft.com/mapi/proptag/0x1035001F) property.

MAPI Properties to check/uncheck Secuity properties

In Outlook 2016 (Outlook 2016 MSO 16.0.4266.1001 64 bit) , when S/Mime user accepts a calendar invitation sent by a non s-mime user, following error is displayed.
"Microsoft Outlook cannot sign or encrypt this message because there are no certificates which can be used to send from the email address . Either get a new digital ID to use with this account, or use the accounts button to send the message using an account that you have certificates for."
This error is not seen with Outlook 2013.
These 3 security properties are checked on opening the event (which are unchecked in Outlook 2013)
Encrypt message contents and attachments.
Add digital signature to outgoing messages.
Request S/Mime receipt for this message.
What mapi properties are used to check/uncheck these security properties?

Meeting creation addin for outlook with C#

I need to create an outlook addin that will do the things I listed below before sending a meeting request:
Check how many users are in the To list, warn if there are more than predefined number of users
Warn if subject line is empty
Warn if word "attachment" is used in mail body but no attachments can be found in the mail
Is it possible to do this with Office Interop or with a VSTO addin? I need to intercept and cancel the sending of meeting request if one of the rules above doesn't meet.
Thanks.
You can do it with VSTO. I did use it in the past to make an outlook addin to add a dynamic signature to a message before send it. You can subscribe to events to check your rules, and allow or cancel your meeting request.

Resources