ImapSettings
Stay organized with collections
Save and categorize content based on your preferences.
IMAP settings for an account.
JSON representation |
{
"enabled": boolean,
"autoExpunge": boolean,
"expungeBehavior": enum (ExpungeBehavior ),
"maxFolderSize": integer
} |
Fields |
enabled |
boolean
Whether IMAP is enabled for the account.
|
autoExpunge |
boolean
If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted.
|
expungeBehavior |
enum (ExpungeBehavior )
The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder.
|
maxFolderSize |
integer
An optional limit on the number of messages that an IMAP folder may contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted to mean that there is no limit.
|
ExpungeBehavior
Enums |
expungeBehaviorUnspecified |
Unspecified behavior. |
archive |
Archive messages marked as deleted. |
trash |
Move messages marked as deleted to the trash. |
deleteForever |
Immediately and permanently delete messages marked as deleted. The expunged messages cannot be recovered. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-24 UTC.
[null,null,["Last updated 2025-03-24 UTC."],[],[],null,["# ImapSettings\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [ExpungeBehavior](#ExpungeBehavior)\n\nIMAP settings for an account.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"enabled\": boolean, \"autoExpunge\": boolean, \"expungeBehavior\": enum (/workspace/gmail/api/reference/rest/v1/ImapSettings#ExpungeBehavior), \"maxFolderSize\": integer } ``` |\n\n| Fields ||\n|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enabled` | `boolean` Whether IMAP is enabled for the account. |\n| `autoExpunge` | `boolean` If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted. |\n| `expungeBehavior` | `enum (`[ExpungeBehavior](/workspace/gmail/api/reference/rest/v1/ImapSettings#ExpungeBehavior)`)` The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder. |\n| `maxFolderSize` | `integer` An optional limit on the number of messages that an IMAP folder may contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted to mean that there is no limit. |\n\nExpungeBehavior\n---------------\n\n| Enums ||\n|------------------------------|-----------------------------------------------------------------------------------------------------------|\n| `expungeBehaviorUnspecified` | Unspecified behavior. |\n| `archive` | Archive messages marked as deleted. |\n| `trash` | Move messages marked as deleted to the trash. |\n| `deleteForever` | Immediately and permanently delete messages marked as deleted. The expunged messages cannot be recovered. |"]]