Apply a Signature Based on Sender Domain

In some scenarios, you may want to apply a specific signature only when the email is sent from a particular domain. This can be achieved by creating a Rule in the Crossware Designer Portal that checks the sender’s domain and applies the correct signature accordingly.


Create a Rule

  1. In the Admin section, open Rules.

  2. Click CREATE NEW.

  3. Create a new rule (e.g., DomainSelection).

  4. Under Rule Type, click Advanced Formula.

  5. Add the C# script provided below.

C#
List < string > strList = new List < string > ();
strList.Add("@gmail.com");
strList.Add("@crossware365.com");
if (EmailProperties.ContainsKey("SMTPRCPTTO")) {
  foreach(string strItem in strList) {
    if (EmailProperties["SMTPRCPTTO"].IndexOf(strItem, StringComparison.OrdinalIgnoreCase) >= 0) {
      return false;
    }
  }
}
return true;
  • Replace gmail.com and http://crossware365.com with the domain you want to check.

  • This rule will evaluate the sender’s domain and return true only if it matches.

image-20251112-194619.png

  • Signature

image-20251112-195220.png
  • Signature blocks

image-20251112-195412.png

Test the Setup

  • Send a test email from the specified domain.

  • Confirm that the signature is properly appended only when the sender’s domain meets the rule criteria.


Crossware will automatically applies the signature based on the sender domain.