Thursday, January 10, 2013

How To - Trigger an application via email in Outlook


If you have been using Microsoft Outlook at office or at home, you will know that there is an option to assign rules to every email that you send or receive. Each rule can be set to move any email – be it from a person, an email account or with particular texts in the subject or the body – to particular folders automatically. Therefore, every time an email is sent or arrives, the set rules take over and handle the emails accordingly. A few might know that you could also actually use these rules to get some automated work done for you.

Let’s take a practical example from our day-to-day life. You are at office and your home PC is set to download some torrents or is presently downloading a large file from an HTTP or FTP server. Now you need to access your PC remotely to shut it down, resume a paused download or maybe stop the seeding of a particular torrent. One option is RDP or using Team Viewer software, which can help you completely. However, if the case is the opposite and your PC is in the office and you are at home, and your office network does not permit the use of RDP or Team viewer, you cannot access the PC at all. 

Another example is that of a network admin who has his servers running at office and now he needs to run a backup, synchronise some data to an FTP server, simply shut down the server or start a service. He too can use an RDP or VNC client and take over or schedule some tasks in this case. Here again, what if you need to remotely access the office PC or network? Or, what if you are on a long weekend or a holiday and you do not have a PC and are only left with a mobile phone with a weak or no Internet connection at all? What do you do in such a case? One option is to call someone at home or office (depending on the situation) to get the work done. However, this also involves giving away your access password. Alternatively, in the worst case scenario, what if there's no one at home or office or you forgot to keep the RDP, VNC server or Team Viewer utility running? You would only have to wait until you get back to the PC and physically access it. There is a simple method to save your day and a simple email can come to your rescue.  
Head on to the Rules and Alerts section in Outlook
  
If you have been using Microsoft Office on your PC, then you'll definitely find Microsoft Outlook in the bundle. Why not make use of Outlook to do this simple important job for you? All you need to do is set some rules on your Outlook client, and the rule will detect the phrases and do the suitable work it is designed to do. 

In this article, we shall show you one example of how to trigger an application on the PC by simply sending an email to a specified email account. All that is necessary is exact defined words in the subject or body text. In our example, we are going to send an email with the subject “Start TeamViewer” and Outlook will start it for us without any questions asked, unless necessary. However, before doing so, you have to pre-configure the application that needs triggering and ensure that Outlook is running in the background. 
  
Check out what needs to be done. Initially, set up Outlook to receive emails using the POP or IMAP settings. It is recommended that you register yourself with a new Gmail account and configure the POP servers for the email in Outlook. Once Outlook is configured for the new email account, follow the procedure ahead. 

Click on “Tools - > Rules and Alerts”. On the new window that pops up, click on the ‘New Rule…” button. A “Rules Wizard” window will pop up. Here you need to set the first criteria – the Template. There are three templates here, of which two are pre designed and one is a manual setup. In the top section, select "Check messages when they arrive" from the section "Start from a blank rule" and click "Next". In the next window, you will find a lot of check boxes with different criterion for the rule. Select "through specified account" and "with specific words in the subject". This selection will make sure the triggering email has come in from a specified email account and has the specific words in the subject line. You can choose many more options such as words in the message body or subject, in senders address, in the header, date span, emails with attachments, and many more—take your pick. 

 
 
After you have checked the box(es), you will find the bottom window filling up with lines according to your selection. Each line will have an underlined word(s), which means you have to specify the function for it. In our example, we selected text in the subject body and hence, we have to specify the specific words for it. Click on the "Specific Words" and you will see a new popup where you can add a single or multiple words to the list. After you have finished adding the words, move on by clicking the "Next" button. Here you will need to specify the execution for the trigger. You can choose to let Outlook send, move or delete the email to folders, play a sound, start an application, process more rules or simply display an alert window. In our case, we have selected to start an application. Click on "application" in the bottom window and enter the path to the application you want to run. After you have selected the application, click on "Finish" and return to the rules wizard. Now send a test email to the email account and check if outlook receives the email and automatically starts the application you asked for.

Note: Outlook is usually set to send and receive emails automatically after every 30-minute interval. You need to decrease this time to around 5 minutes or lower. To do this, go to "Tools -> Options -> Mail Setup -> Send/Receive" and decrease the scheduling period. This will ensure that your application or function is triggered within 5 minutes, at least.

Tip: You can use a mouse and keyboard macro recorder to record your work and play the sequence accordingly if your trigger application needs additional user intervention after being started. "Macro Recorder" is a keyboard and mouse macro recording utility for Windows, which can convert the recorded actions into a single EXE file for execution. This can be used for operating applications such as torrent clients, backup and sync utilities, server services, video chatting utilities etc., where user intervention is required. This process can also be used for starting a video surveillance using your webcam in your absence.

No comments:

Post a Comment