Previous Topic

Next Topic

Book Contents

Respond to e-mail requests

MailRules can be used to provide information or perform operations on demand. In this topic we'll see how we can use a regular mail client to send e-mail that causes MailRules to perform actions such as run applications or transmit data.

This example works by using the Run Outbound Rule option of an Inbound Rule. Therefore, we will create manual Outbound Rules, then create Inbound Rules that will trigger them - in this respect, the example may seem "backwards" but you'll realise that to send something on demand, you have to firstly define what it is you're sending.

1. Creating a message to send

In this scenario, just for fun we have created a "quote of the day" service. Anyone who choses, can e-mail a request to us and we will send them the quote of the day. To implement our "quote of the day server", we create an Outbound Rule by click Add on the Outbound Rule menu. MailRules shows us blank Outbound Rule, the first thing we do is change the Rule Name to be more meaningful.

Respond to e-mail requests 1

Now, we set the subject of our e-mail to be "Quote of the Day". We do not know to whom this e-mail will be addressed, so we must click Prompt for Recipients. Now, we click Body File.. and browse to the file that will contain our quote of the day.

Respond to email requests 2

The only other thing we need to is to indicate that this e-mail is not scheduled for transmission and can only be sent manually. This is done on the When tab, where we click Add and select Manual.

Respond to e-mail requests 3

Now we click OK and our Outbound Rule is complete. MailRules will advise us that we have not selected any files to transmit, simply click Yes to confirm that this is intentional.

2. Causing the e-mail to be sent on demand

In order to make MailRules respond to a user request for the quote of the day, we must create an Inbound Rule by clicking Add on the Inbound Rule menu. MailRules shows us a blank Inbound Rule, the first thing we do is change the Rule Name to be more meaningful.

Note that Rule Names are globally unique (that is, no Inbound Rule may share a name with an Outbound Rule).

We click Delete Original Mail since we will have no reason to retain the e-mail message in the mailbox after MailRules has read it.

Respond to email requests 4

We set the Subject to "Quote of the Day", therefore MailRules will perform actions whenever it encounters an e-mail with the subject "Quote of the Day".

Note that MailRules Inbound subjects are case insensitive (that is, "Quote of the Day" = "QUOTE OF THE DAY").

Not that we expect to receive any attachments, but we must provide a location for file attachments to the e-mail message to be saved should there be any.This is done on the Storage tab where we select MailRules from the list of Aliases available by clicking the Alias button.

Respond to e-mail requests 6

Now we click Run App. and click Run this Outbound Rule, we select the Outbound Rule, Quote of the Day, from the list and also click Reply to Sender. This means that the Outbound Rule will be addressed to whomever has triggered the application of the Inbound Rule.

Respond to e-mail requests 7

We click OK and our "Quote of the day server" is ready.

What will happen now: When MailRules checks our e-mail, if it finds a message (from anyone) with the subject exactly set to "Quote of the day" then it will send the Outbound Rule "Quote of the Day" to that person.

Summary

In this topic you have seen:

For more examples, see also the separate topic, Using MailRules as a List Server.

See Also

What do I do with MailRules?

Introduction

Manage your e-mail

Simple file transfer

File synchronisation

Collaborating & unifying applications

Large file transfer

Mass & personalised mailing