6. Advanced Features#
6.1. How to Customize Actions?#
MailTrigger supports various actions. If you wish to execute your own actions and have the technical expertise, you can upload your own WASM file (see “What is WebAssembly?” section for details) to determine how email content should be processed. For example, you might want to preprocess email content before sending it via your webhook URL. After referencing the “WASM Format Specifications” section, implement the processing logic in Python (or another language), compile it into a WASM file, upload it to MailTrigger, and configure corresponding routes. This allows you to process email content according to the logic defined in your WASM file.
6.2. Setting Up Scheduled Actions#
Jack uses a server resource management system that emails him about all server resource changes. However, due to the frequent notifications, Jack misses important messages. To address this, Jack uses MailTrigger’s background task execution feature to write the necessary logic and compile it into a WASM file. Here are the complete steps:
Configure routes so that emails related to “server resource changes” take no action, ensuring they do not clutter Jack’s mailbox.
Steps to create and enable background tasks are pending.
Steps to complete and view background task execution status are pending.
6.3. How to set additional information for recipients?#
In certain actions, additional recipient information is necessary for execution. Users can provide extra information for each recipient, allowing the MailTrigger system to execute specific tasks based on these recipient details. For example, if a user sets an additional information for recipient “test@…” with Apprise_url as “abc.edc@line”, then during the implementation of the Apprise action, MailTrigger will fetch the specific Apprise_url set for recipient “test@…”, which in this example is “abc.edc@line”. Different actions may require different additional information, such as recipient phone numbers. Therefore, users can upload, modify, add, and download different additional information for recipients under each mailbox. Each recipient can have multiple sets of additional information, similar to an Excel table. Specifications are as follows:
email, note, data
test@…, test, {"phone": "912345678", "LINE_TOKEN": "sqljqwiwbqubiqwbeibqwhibihvwihv"}
test2@…, test2, {"phone": "912345679", "LINE_TOKEN": "djqskdnqojdnijqwndjiqwbidbhiqwbdhiqwbdqwbdhjqwdbjqwd"}
The value of the data field is strictly in JSON format, where users can define keys and values freely.
6.4. How to determine the execution order and logic between routes?#
For multiple routes within each mailbox, users can arrange the order between routes through drag-and-drop to determine whether specific routes should execute. Each route has a boolean field pass2another
. If pass2another
is True for a route that has been triggered and executed, all subsequent routes in order will continue to execute sequentially without interruption. Conversely, if pass2another
is False, routes following in order will not be triggered, effectively halting execution. This mechanism allows users to decide which routes should stop executing after a specific route is triggered. For instance, if a user has routes A and B in order, and wishes for route A to stop executing subsequent routes, they would set pass2another
for route A to False.