mailapi:autoresponderconditionlist

AutoresponderConditionList Replacement

Use:

~autoresponderconditionlist~

Required parameter: responderid - the ID of the autoresponder

This returns a JSON structure containing an array of the rules associated with the specified autoresponder.

The return structure is an array of objects containing:

  • condid - autoresponder rule id
  • autoresponderid - autoresponder id
  • name - the user-defined name of the rule
  • enabled - whether the rule triggers or blocks the autoresponder
  • priority - the priority of the rule (higher numbers are processed first)
  • usernumber - the numeric id of the user the rule applies to
  • datefrom - the date the rule applies from (yyyy-mm-dd) inclusive
  • dateto - the date the rule applies to (yyyy-mm-dd) inclusive
  • timefrom - the time the rule applies from (hh:mm:ss) inclusive
  • timeto - the time the rule applies to (hh:mm_ss) inclusive
  • datetimefrom - the date/time the rule applies from (yyyy-mm-dd hh:mm:ss) inclusive
  • datetimeto - the date/time the rule applies to (yyyy-mm-dd hh:mm:ss) inclusive
  • dow - the days of the week the rule applies to (0=Sunday, 1=Monday, etc)
  • sender - the sender address the rule applies to (use %/_ (SQL “LIKE”) wildcards or prefix the text with '/' and use PostgreSQL 'Regexes')
  • subject - the subject the rule applies to (use %/_ (SQL “LIKE”) wildcards or prefix the text with '/' and use PostgreSQL 'Regexes')
  • locked - if true the user cannot change these settings themselves, only an administrator can (note that ANY locked rules on an autoresponder will prevent any changes to rules for that autoresponder - this is to stop the user adding a higher priority 'block' rule)

The reason to have separate date, time AND date/time conditions is to allow functionality such as:

  1. user wants autoresponder to act from 9:00am to 5:30pm every day when they are on holiday. This requires a separate 'time' condition, cannot be done with only a date/time condition
  2. user is going on holiday at 1:00pm on the first day. This requires a separate 'date/time' condition, cannot be done with only a date and a time condition.

Leave any unspecified conditions blank, and they will not be tested. All specified conditions have to match for the rule to fire. Use multiple rules if you want any one of a set of conditions to cause the autoresponder to fire.

mailapi/autoresponderconditionlist.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1