MailRules can read the e-mail you receive and perform actions on it based on Rules that you specify. These Rules define a critieria, wherein you explain what to look for in an e-mail - for example, from a certain person, certain words in the subject or certain files attached to the message. This functionality is not new, but MailRules allows you to take the concept a step further: you can perform specific operatins on the files you receive, build an archive of messages, and send messages back to the Sender of your e-mail or to other people.
MailRules reads e-mail at either scheduled times (see Check Times) or can be instructed to read immediately by clicking the Check Now button.
We'll create an Inbound Rule that will store the message for us by clicking Add on the Inbound Rules menu. MailRules displays a blank Inbound Rule, the first thing we do is to change the Rule Name to be more meaningful. We also click Delete Original Mail (which will remove the e-mail from our mailbox after MailRules has read it & performed whatever actions we specfy) and Notify Me (which will display a small notification on-screen when MailRules performs the actions).

Now, we tell MailRules to look for the e-mail we sent by typing "Initial inbound test" into the Subject field.

Now, we click Storage to tell MailRules what to do with the file we attached to the e-mail. We click the Alias button and are asked to select from a list of predefined Aliases (an Alias is name assigned to a folder). We select the MailRules Alias (note that the MailRules Alias is, by default, C:\Program Files\MailRules\MRDefault, but you can change this in the Alias screen).

We are also interested in saving the the actual text of the e-mail, so we click Message, then Save body text as a file. We enter a filename (note that it defaults to .txt extention and that message body text can only be stored in a text format).

This completes our Inbound Rule definition for now, so we click OK to save the Rule.
What will happen now: When MailRules reads the new e-mail in the mailbox, if it finds a message that matches this criteria (that is, the subject is exactly equal to "Initial Inbound test") then it will save any file attachments to the directory indicated by the Alias, MailRules. It will also save the message body into a text file called itest.txt - this file will be saved into the same location as the file attachments. Once these actions are complete, the original e-mail will be deleted from the mailbox and a notification message will be displayed on screen.
You can prove the above by using the Compose button from the MailRules Tools menu. Enter your e-mail address into the To: field. In the Subject, type "Initial Inbound test", add a few words to the message body and then select a file to attach to the message using the Add button. Now click Send Now and after a few moments MailRules will say "Message sent" (the message will appear in your regular mail client in due time). Once the message has appeared in your mail client's mailbox, either click Check Now or wait for one of your predefined Check Times to occur.
Click on the Inbound Rule created in step one, then click the Edit button. We click Storage, then click Unzip *.ZIP files. After the Inbound Rule has saved any Zip file into the specified folder, it will then unzip (decompress) that file.
The UnZip facility will not work on Zip files that have been password protected by the Sender, however, if the Sender has used MailRules to transmit the file and used MailRules encryption then the file can automatically be unencrypted and then decompressed. This encryption uses the TripleDES algorithm which is much stronger than standard Zip encryption.
We also click This Rule is only triggered if attachments are saved. By so doing, if we receive an e-mail with the subject of "Initial inbound test" but with no files attached to it, then no actions (such as saving the message body) will be performed. Actions will only be performed if a file is saved.

Now we click Run App. If we have received any text files as a part of the e-mail, we might like to automatically view them with the Notepad application. Using the browse buttons, we can find the Notepad.exe file (normally located in the Windows directory), however, Notepad is quite likely to be in the Windows path therefore we can just type Notepad into Run Application and click the Test button to make sure that the program can be found.
We want to see all the received text files in individual sessions of Notepad, so we click the Attachments button and select Run command for each file (with wildcard). This will put <<Filename>>=*.* into our application description, so we simply remove the last asterix (*) and replace it with txt.

This completes the definition of our Inbound Rule, so we click OK to save the changes.
What will happen now: When MailRules reads the new e-mail in the mailbox, if it finds a message that matches this criteria (that is, the subject is exactly equal to "Initial Inbound test") then it will save any file attachments to the directory indicated by the Alias, MailRules. It will also save the message body into a text file called itest.txt - this file will be saved into the same location as the file attachments. If we have received a zip file, it will be unzipped. If we have received any text files, these will be displayed in Notepad. Once these actions are complete, the original e-mail will be deleted from the mailbox and a notification message will be displayed on screen.
In this topic you have seen: