This document explains how to use the vacation responder in the Gmail API.
You can use the settings
resource to
configure an automatic reply for an account.
For information on how to get
or update
vacation responder settings, see the settings
resource.
Configure automatic reply
Automatic reply requires a response subject and body in either HTML or plain
text. These are set using the VacationSettings
object. You can enable automatic reply indefinitely or limit it to a specific
period of time. You can also restrict automatic reply to known contacts or
domain members.
The following code samples show how to set an automatic reply for a fixed period of time and restrict replies to users in the same domain:
Java
Python
To disable automatic reply, call the settings.updateVacation
method and set the enableAutoReply
field on the VacationSettings
object to false
. If you set an endTime
value, automatic reply is disabled once the specified time has passed.

