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)
選填的自動回覆結束時間 (紀元 ms)。指定這項設定後,Gmail 只會自動回覆在結束時間之前收到的郵件。如果同時指定 startTime 和 endTime ,startTime 必須在 endTime 前面。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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`. |"]]