Rules
Rules allow you to perform various automated tasks as new e-mails arrive depending on the contents of each message.

A Help button can be found in the lower left corner of the screen.

At the top there are the three main buttons used for rule management:

Add a new rule. First click this button and then fill in the details that will show up just to the right of the rule list.
Delete the currently selected rule.
Import the rules from someone elses RULES.INI file.

Just below the main buttons and to the left, is the list of all the rules you may have defined or just added. You may enable or disable each rule by clicking the checkmark next to the rule in the list or from the rule details area. Selecting a rule will list its details with all of its various options, criteria and actions you want for the rule.

Just to the right of the rules list is where you will be adding or editing the rule details. The following can be set:

Name Name is for your own identification of the rule, you may choose whatever you like. TIP: A descriptive name may make it easier for organizing your rules.
Enabled Checkbox to Enable or Disable the rule. Only enabled rules will be run.
Account This can make the rule work either with all of the accounts or just one specified account.
New Messages Only If enabled, the rule will only test an e-mail message if it arrived since the last mail check, all previous messages will not be tested again.
Needed Selects if the rule is to work if ANY of the criteria rows match (ANY Row) or only when ALL of the criteria rows match (ALL Rows).

Tip: Use (ANY Row) to group similar criteria that will use the same actions you want performed such as those that may identify spam.
Use (ALL Row) to create more complex rules that require several criteria to match and then select the actions you want performed.
Criteria Row Each rule can have multiple criteria rows. Each criteria row has four areas.
Area Select the Area in the messages to test. See Area below for more information.
Compare Select the Compare method you want to test with. See Compare below for more information.
Text The text or criteria you want to search for in the messages. You may use letters, symbols, or numbers in this area. This area isn't case sensitive, an upper case letter is treated the same as a lower case letter.
Example: A large "P" is treated the same as a small "p".
Not If enabled, this means that the Criteria Area does not contain the search text you have defined anywhere.

Example: If you put "PopTrayU" in the text area, everything that does not have the word "PopTrayU" will cause the rule to match.

Note: Be careful with this option. An easy mistake to make is to create a rule that would delete everything that doesn't contain your e-mail address in the TO: field, but that would mean that any message sent as a CC: or BCC: to you will also be deleted.
Area The area within your e-mail messages that you want to test for the text or criteria you have defined.
Header: Anywhere in the header. TIP: Use this with caution. Using text such as "from", "date" or other text that may be in all e-mail headers will cause your rule to match on all e-mail messages.
From: The name and e-mail address of the person who sent the message. Example: "Joe Smith" <jsmith@email.com>
From (Name): Just the name of the person who sent the message. Example: "Joe Smith"
From (Address): Just the e-mail address of the person who sent the message. Example: <jsmith@email.com>
Subject: The subject line of the message.
To: The name or e-mail address where the message was sent to.
CC: Additional names or e-mail addresses where the message was sent to.
Status: Checks if an e-mail has the following qualities or attributes.

  • Protected - Protected by either the white list or a rule.
  • To be Deleted - Checks if a message is marked for deletion. ** Only works along with the "Delete Mail only on Next Check" option on the General Options page.
  • Ignored - Checks if a message is marked as ignored.
  • Spam - Checks if a messages is marked as spam.
  • Important - Checks if a message is marked as important. **Important isn't the same as an e-mails priority level.
  • Has Attachment - Checks if an e-mail has an attachment.
  • Viewed - Checks to see if an e-mail has been viewed in the Mail window.
  • New - Checks to see if an e-mail is new since the last mail check.
  • Body: Tests the body of the e-mail message for the search text you have defined. ** This is only available if you have the "Retrieve Body while Checking" option enabled on the Advanced Options page.
    Compare Method
    Contains: Checks to see if the search text or criteria is contained anywhere in the Criteria Area.
    Equals: Checks to see if the Criteria Area is exactly the same as your search text or criteria. This is case-insensitive.
    WildCard: Allows you to specify wildcards in your search text or criteria. Two wildcard characters are supported:

      *   Will match any number of characters.
      ?  Will match only any single character.

    Examples:
      sp*m will match if the criteria text is "spam" or "spaaam",
      sp?m will match only for "spam" or "sp@m", not "spaam".

    Without using any wildcards, the text is compared the same as if you had used "Equals".

    If you use *text*, it will compare the same as if you had used "Contains".

    If you use "a*", it will match all words where the text start with an "a".
    Empty: Matchs if the Criteria Area contains no characters at all. Note: Spaces are considered characters so if an area has spaces it won't be considered empty.
    RegExpr: Using regular expressions allows your searchs to be very precise or very flexible. You could say that its is like Wildcards on steriods. To learn more about regular expressions, do a search on the internet for "regular expressions"

    To test if your regular expression syntax you have made is valid, just press the button next to it.
    Actions PopTrayU can perform the following actions when an e-mail message arrives that matchs the criteria that you have defined.
    Delete from Server: Delete the message from the server without showing it to you or notifying you of it's arrival. Use With Caution.
    Play Sound: Will allow you to play a different sound than the account or default sound.
    Mark as Spam: Mark the message as Spam. It will be shown with a different icon and you can delete all spam messages by click the "Del Spam" button in the Mail Window.
    Execute file: Run the selected program or open the selected file.

    You can specify macros in the command you want to execute, and these will be replaced by the corresponding value.
      The following macros are supported:
    • %ACCOUNT%
    • %ACCOUNTNUM%
    • %FROM%
    • %FROMADDRESS%
    • %TO%
    • %SUBJECT%
    • %DATE%
    • %SIZE%
    • %MSGID%
    • %UID%
    • %MSGNUM%
    Note: While you can use this by simply selecting the program to run or file to open, it can be very powerful also. This can extend PopTrays functionality to utilize every program's capability if it is available from the other program's command-line options.
    Ignore: PopTrayU won't notify you when the message arrives. No notification sound will be played, and it won't be indicated on the tray icon. It will also show a different icon in the Mail Window.
    Tray Color: You can change the tray notification color to one that is different than the color selected for the account.
    Important: The message will be marked as important and a different icon will be displayed. Also a balloon pop-up (on Win2000 and later) will be displayed that an important message has arrived.
    Protect against
    auto-delete:
    Protect the message against rules and the blacklist that would otherwise delete the message. Also protect against being marked a spam. The message will get a green icon to show it is protected.
    Log Rule: When "Log Rules" is enabled, this rule will get written to the log when a rule has a match. ** Requires that the option Log Rules also be enabled in the Miscellaneous Options page.

    The log is named Rules.log and can be found in the PopTrayU or User defined directory.

    After filling in the details above, remember to click the "Save Rules" button. This will save all the rules to Rules.ini file in the PopTrayU or User defined directory.