Managing Vacation Settings
You can use Settings to
configure scheduled auto-reply for an account.
For information on how to
get or
update,
see the Settings reference.
Configuring auto-reply
Auto-reply requires a response subject and body, either HTML or plain text. It
can be enabled indefinitely, or limited to a defined period of time. You can
also restrict auto-reply to known contacts or domain members.
Example of setting an auto-reply for a fixed period of time, restricting replies
to users in the same domain:
To disable auto-reply, update the resource and set enableAutoReply
to
false
. If an endTime
is configured, auto-reply will automatically disable
once the specified time has passed.
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 2024-12-19 UTC.
[null,null,["Last updated 2024-12-19 UTC."],[[["Configure scheduled auto-replies for a Gmail account using the Gmail API's Settings resource."],["Auto-replies require a subject and body, can be time-limited, and restricted to specific contacts or domains."],["Provided code samples (Java and Python) demonstrate enabling auto-reply for a fixed duration and within a domain."],["Disable auto-reply by setting `enableAutoReply` to `false` or letting the `endTime` automatically deactivate it."]]],["The content explains how to configure and manage Gmail's auto-reply feature using the Settings API. Key actions include: enabling auto-reply with a subject and body, setting a duration (start/end time), and restricting it to domain members or contacts. Auto-reply can be enabled indefinitely or for a set period. Code examples demonstrate enabling auto-reply for a week, restricting it to domain members. Disabling the feature requires setting `enableAutoReply` to `false`, or it will auto-disable after the `endTime`.\n"]]