Skip to main content
Version: 10.0

Add a email filtering property

Level: intermediate
note

The functionality is relevant to Classic UI.

Case description

Add a new No-reply property for case analysis. If the property is found in the email header and its value is anything other than "No", treat the case as blacklisted.

Case implementation algorithm

1. Add a new class that implements the IHeaderPropertyHandler interface

  1. Add a "Source code" schema. In this schema, define a class that implements the IHeaderPropertyHandler interface, e.g.:

    namespace Terrasoft.Configuration
    {
    using System;
    public class NoreplyHandler: IHeaderPropertyHandler
    {
    public bool Check(object value) {
    return string.Equals(value.ToString(), "No", StringComparison.OrdinalIgnoreCase);
    }
    }
    }
  2. Publish the changes.

The IHeaderPropertyHandler interface is defined in the JunkFilter package, so it must be added to the user-made package dependency.

2. Adding a lookup value

Add the No-reply property to the Email header properties management lookup. Select the NoreplyHandler class (created in the previous paragraph) as the handler class (handler property).

After receiving an email with a No-reply header flag and a value that is anything other than "No", the following options are possible:

  • the case is not created if the [Create Cases From Junk Emails] system setting value is false;
  • the case is created with the [Junk Case Default Status] system setting status if the [Create Cases From Junk Emails] system setting value is true.