Apply Different Signatures Using Subject Triggers

You can use subject keywords to decide which signature is applied or to prevent a signature from being applied at all. This gives users a quick way to control signature behavior directly from the email subject line.


Create a Rule

  1. Sign in to the Crossware Portal and navigate to the Rules section.

  2. Create a new rule (e.g., Private Email).

  3. Click the CUSTOM tab and add the C# script provided below to detect the keyword.

    • Example keyword: [P]

C#
List < string > lSubject;
string strSubject;
string strTest = "";
string strCheck = "[P]";
if (pEmailHeaders.ContainsKey("subject")) {
lSubject = pEmailHeaders["subject"];
strSubject = lSubject[0];
if (strSubject.Length >= 3) {
strTest = strSubject.Substring(0, 3);
}
if (strTest == strCheck) {
lSubject[0] = strSubject.Substring(strCheck.Length, strSubject.Length - strCheck.Length);
pEmailHeaders["subject"] = lSubject;
return true;
}
}
return false;
image-20260304-224622.png


Order Signature Priority

  • Go to the Order of Selection to ensure your rule-linked signature is evaluated before default signatures.

image-20260304-230930.png

Test the Setup

  1. Send an email with the subject starting with [P].

image-20260112-201603.png
  1. Confirm that:

    • The correct signature is applied.

    • The keyword is removed from the subject line.

image-20260112-201725.png