Configure search by email headers

Note: Before you begin, please read Save email headers in SharePoint.

This article explains how to add the email header columns From, To, Subject, CC to the harmon.ie search.

Searching by email headers

A M365 administrator needs to:

  1. Make sure email header mapping is configured for the site collection.
  2. Enable search by email header:
    • If email header mapping was first configured in harmon.ie 9.5 or later, you can configure email header search by provisioning the SearchColumns registry key according to this example. The order of the keys will be the order of the fields in the harmon.ie search.

      Windows Registry Editor Version 5.00
      
      [HKEY_CURRENT_USER\Software\Mainsoft\Prefs\SearchColumns]
      
      [HKEY_CURRENT_USER\Software\Mainsoft\Prefs\SearchColumns\hrmV2FromOWSTEXT]
      @="From"
      
      [HKEY_CURRENT_USER\Software\Mainsoft\Prefs\SearchColumns\hrmV2ToOWSTEXT]
      @="To"
      
      [HKEY_CURRENT_USER\Software\Mainsoft\Prefs\SearchColumns\hrmV2SubjectOWSTEXT]
      @="Subject"
      
      [HKEY_CURRENT_USER\Software\Mainsoft\Prefs\SearchColumns\hrmV2CcOWSTEXT]
      @="Cc"
      
      

      Download reg key sample for assistance.
      Note: You may replace the subject key with Conversation Topic, to save the subject without the prefix (“RE:”, “FW:”), as follows:

      [HKEY_CURRENT_USER\Software\Mainsoft\Prefs\SearchColumns\hrmV2ConversationTopicOWSTEXT]
      @="Subject"
      "SiteColumnNames"="Conversation Topic"
      
    • If email header mapping was configured in an earlier version of harmon.ie, you would have to manually configure email header search as explained below.

To manually configure email header search:

The process of configuring the email headers by which users can search for emails that were saved to SharePoint includes three steps:

  1. Map email crawled properties to managed properties.
  2. Provision the email search properties.
  3. Enable the feature – After the site, library, or list has been crawled, users can search for the content and metadata of new, or changed managed properties.

Note: This procedure is done once for each site collection.

1. Map the email header crawled properties to managed properties:

To be able to search for emails already uploaded to SharePoint, you have to map the configured email header properties to managed properties.

  1. Open M365 admin Center > Search > Manage Search Schema.
  2. For each of the email headers you want to search, do the following:
    1. Filter the managed property list for “RefinableString”.
    2. Select an unmapped RefinableString and click it to map to the email crawled properties.
      Map refinable strings to crawled properties
    3. Scroll down to the end of the page. Next to “Mappings to crawled properties” select “Include content from the first crawled property, that is not empty, based on the specified order”.
    4. Select Add a Mapping.
    5. Search for a crawled property name (e.g. “Subject”). The internal names are shown, with prefixes that were added to differentiate site-level and library-level properties. For example: The internal name of the Subject property is ows_Subject1 in the library level and ows_Q_TEXT_Subject1 in the site level. You may select either library-level properties or site-level properties (we recommend the former).
      Crawled property selection
    6. Select all the crawled properties that are used to store email headers. You would have to add them one by one, as multiple selection is not allowed here. If previous versions of harmon.ie were used, you may also find hrm and hrmV2 property names. Include them as well.

2. Provision the email search properties:

Each Refinablestring mapped to crawled properties in the previous step, should be provisioned to all users under the SearchColumns registry key, as follows:

  1. Create a sub-key called “RefinableString##” (replace ## with the number of the property).
  2. Set the (default) String value to the column name as you want to display in harmon.ie.
  3. Add a String Value called SiteColumnsNames and set its value to a comma separated list of the column names you mapped to “RefinableString##”. Use the SharePoint column names, not internal names.

e.g:

	[HKEY_CURRENT_USER\Software\Mainsoft\Prefs\SearchColumns\RefinableString00]
	@="Subject"
	"SiteColumnNames"="hrmV2Subject,hrmSubject0,Subject1"

3. Enable the feature to your users:

Re-index the SharePoint site collection, to update your changes in SharePoint. This process my take up to a few days when run for the first time.