Mail policies

A mail policy is a set of rules that mails should follow. A mail policy consists of:

  • Mail policy id, used to uniquely identify the mail policy.
  • Name, used as a user-friendly name.
  • Priority, used to prioritize mails during dispatching, where '1' is highest priority
  • Retention period, how long a mail is kept after it has been sent or failed permanently.
  • Maximum number of attempts, the number of times the mail is attempted to be sent before it is marked as failed permanently.
  • Mail cleanup action, used to indicate what should happen after a mail's retention period is over, which can be one of: 'None', 'Delete' or 'Archive'. Mail cleanup happens as a background job.

A mail policy must point to a mail provider, which you can read more about here.