Creating Receive Scripts


Back to Receive Action...

To write a receive script for an email box please follow these steps:

  1. Read the chapter "Writing Scripts" in this manual to understand the basics of javascript programming in todo4teams.
  2. Write your script code from scratch or paste a piece of sample code in the editor pane.
  3. Click "Validate". Your script will be checked for syntax errors which will be displayed in a popup window. Please read the error message and note the line number shown. Correct the errors.
  4. Save a message in eml format using an email client e.g. thunderbird.
  5. Read this file using the button "Email file".
  6. Now click "Simulate". The eml file is processed and a task details dialog is displayed showing the result of the processing.
  7. Check the todo displayed. It should show all modifications made by your script, e.g. altered addresing, updated title, description, priority etc.
  8. Click "Save" to save your script on the server. From this second all incoming messages for this email address will processed by your script.

Please note: If your script produces an (unhandled) error the email message will be processed as if no script was configured. So don't be afraid of scripting errors.

For complex scripting tasks it might make sense to configure an emal box dedicated for developer purposes. As soon as your script works as desired you might copy the code into the target email box.

Go to Example of a Receive Script...

     

Recently Visited

Child Pages