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
-
In the Admin section, open Rules.
-
Click CREATE NEW.
-
Create a new rule (e.g., DomainSelection).
-
Under Rule Type, click Advanced Formula.
-
Add the C# script provided below.
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
trueonly if it matches.
Link the Rule to a Signature or Signature Block
-
Signature
-
Signature blocks
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.