Set forwarding
PUT/api/accounts/:accountId/sieve/forwarding
Turns forwarding of all incoming mail to another address on or off, and returns the saved setting wrapped in forwarding. The body is not wrapped: enabled and address are read from its top level.
Forwarding uses Sieve redirect :copy, so a copy stays in the mailbox and the vacation reply and later filters still run; it runs after the spam and delete filters, so mail those catch is not forwarded unless the filter has stop: false. address is required when enabled is true and, when given, must be a valid email address. The Sieve script is rewritten and activated, keeping filters and the vacation reply.
Invalid input, or a Sieve server without the copy extension, returns 400.
Request
Responses
- 200
- 400
- 401
- 404
- 424
Forwarding settings.
Request failed.
The session has no mailbox access token. code is mail_token_missing; sign in again.
The account does not exist or belongs to another user.
The IMAP, SMTP or Sieve server, or the platform, refused the request or could not be reached.