VacationSettings
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
账号的外出自动回复设置。这些设置对应于网页界面中的“外出回复”功能。
JSON 表示法 |
{
"enableAutoReply": boolean,
"responseSubject": string,
"responseBodyPlainText": string,
"responseBodyHtml": string,
"restrictToContacts": boolean,
"restrictToDomain": boolean,
"startTime": string,
"endTime": string
} |
字段 |
enableAutoReply |
boolean
用于控制 Gmail 是否自动回复邮件的标志。
|
responseSubject |
string
可选文本,用于在外出回复的主题行前面添加。如需启用自动回复,响应主题或响应正文必须不为空。
|
responseBodyPlainText |
string
采用纯文本格式的响应正文。如果同时指定了 responseBodyPlainText 和 responseBodyHtml ,则使用 responseBodyHtml 。
|
responseBodyHtml |
string
采用 HTML 格式的响应正文。Gmail 会先对 HTML 进行清理,然后再进行存储。如果同时指定了 responseBodyPlainText 和 responseBodyHtml ,则使用 responseBodyHtml 。
|
restrictToContacts |
boolean
用于确定是否向不在用户通讯录中的收件人发送回复的标志。
|
restrictToDomain |
boolean
用于确定是否将回复发送给用户网域之外的收件人的标志。此功能仅适用于 Google Workspace 用户。
|
startTime |
string (int64 format)
发送自动回复的可选开始时间(从公元纪年开始的毫秒数)。指定此时间后,Gmail 将仅自动回复在开始时间之后收到的邮件。如果同时指定了 startTime 和 endTime ,则 startTime 必须在 endTime 前面。
|
endTime |
string (int64 format)
发送自动回复的结束时间(公元纪年毫秒)。指定此时间后,Gmail 将仅自动回复在结束时间之前收到的邮件。如果同时指定了 startTime 和 endTime ,则 startTime 必须在 endTime 前面。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# VacationSettings\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nVacation auto-reply settings for an account. These settings correspond to the [\"Vacation responder\"](https://support.google.com/mail/answer/25922) feature in the web interface.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"enableAutoReply\": boolean, \"responseSubject\": string, \"responseBodyPlainText\": string, \"responseBodyHtml\": string, \"restrictToContacts\": boolean, \"restrictToDomain\": boolean, \"startTime\": string, \"endTime\": string } ``` |\n\n| Fields ||\n|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enableAutoReply` | `boolean` Flag that controls whether Gmail automatically replies to messages. |\n| `responseSubject` | `string` Optional text to prepend to the subject line in vacation responses. In order to enable auto-replies, either the response subject or the response body must be nonempty. |\n| `responseBodyPlainText` | `string` Response body in plain text format. If both `responseBodyPlainText` and `responseBodyHtml` are specified, `responseBodyHtml` will be used. |\n| `responseBodyHtml` | `string` Response body in HTML format. Gmail will sanitize the HTML before storing it. If both `responseBodyPlainText` and `responseBodyHtml` are specified, `responseBodyHtml` will be used. |\n| `restrictToContacts` | `boolean` Flag that determines whether responses are sent to recipients who are not in the user's list of contacts. |\n| `restrictToDomain` | `boolean` Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for Google Workspace users. |\n| `startTime` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` An optional start time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives after the start time. If both `startTime` and `endTime` are specified, `startTime` must precede `endTime`. |\n| `endTime` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` An optional end time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives before the end time. If both `startTime` and `endTime` are specified, `startTime` must precede `endTime`. |"]]