fbpx

Using scripts to filter emails

This item is not supported in the Web app
See the item compatibility table

See also:
Overview of scripting in Email Parser
Email Parser scripting SDK
Example – Basic use of a script to filter incoming emails

For more complex email filtering rules, Email Parser offers filter combination and regular expressions, but you can also write a small C# script to evaluate if the incoming email should be parsed or not. Clicking on “run a script for filtering emails” in the filter settings shows a small text area where you can enter your script:

a script for filtering and discardig emails

To write your own script-based filter you need to implement the function FilterEmail() that receives a standard System.Net.Mail.MailMessage object as a parameter. If the function returns true means that the email passed the filter. False means that the message does not pass the filter.

It is recommended to write and test your script-based filter using the Email Parser scripting SDK. Much more convenient than editing the script directly in Email Parser.


© 2008-2021   FrozenFrog Software    PAD file     Privacy Policy & Terms of Use