Class UpdateDraftBodyAction
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
UpdateDraftBodyAction
Aktualisiert den Text des E-Mail-Entwurfs.
Detaillierte Dokumentation
addUpdateContent(content, contentType)
Fügt dem Textkörper des Entwurfs den angegebenen Inhalt hinzu. Der Typ der content
wird durch ContentType
angegeben.
Parameter
Name | Typ | Beschreibung |
content | String | Der Inhalt, der in den E-Mail-Entwurf eingefügt werden soll. |
contentType | ContentType | Der Inhaltstyp der einzufügenden Inhalte. |
Rückflug
UpdateDraftBodyAction
– dieses Objekt, zur Verkettung
setUpdateType(updateType)
Legt den UpdateDraftBodyType
dieser Aktualisierungsaktion im Textkörper des Entwurfs fest. Beispielsweise können Sie Inhalte am Anfang, Ende oder an der Cursorposition des Entwurfskörpers einfügen.
Parameter
Name | Typ | Beschreibung |
updateType | UpdateDraftBodyType | Die Art der Aktualisierung, die an einem E-Mail-Entwurf vorgenommen werden soll. |
Rückflug
UpdateDraftBodyAction
– dieses Objekt, zur Verkettung
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eUpdateDraftBodyAction\u003c/code\u003e updates the body of an email draft.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to add content (\u003ccode\u003eaddUpdateContent\u003c/code\u003e) and set the update type (\u003ccode\u003esetUpdateType\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eaddUpdateContent\u003c/code\u003e inserts specified content, determined by \u003ccode\u003eContentType\u003c/code\u003e, into the email draft.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetUpdateType\u003c/code\u003e defines how the content is inserted, such as at the beginning, end, or cursor position, using \u003ccode\u003eUpdateDraftBodyType\u003c/code\u003e.\u003c/p\u003e\n"]]],["`UpdateDraftBodyAction` modifies an email draft's body. It provides two key methods: `addUpdateContent` and `setUpdateType`. `addUpdateContent` inserts specified content, defined by a string and content type, into the draft. `setUpdateType` determines where the content is inserted, such as the start, end, or cursor position, using `UpdateDraftBodyType`. Both methods return the `UpdateDraftBodyAction` object, enabling method chaining.\n"],null,["# Class UpdateDraftBodyAction\n\nUpdateDraftBodyAction\n\nUpdates the email draft body. \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------------------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| [addUpdateContent(content, contentType)](#addUpdateContent(String,ContentType)) | [UpdateDraftBodyAction](#) | Adds the specified content to the draft body. |\n| [setUpdateType(updateType)](#setUpdateType(UpdateDraftBodyType)) | [UpdateDraftBodyAction](#) | Sets the [UpdateDraftBodyType](/apps-script/reference/card-service/update-draft-body-type) of this update action on the draft body. |\n\nDetailed documentation\n----------------------\n\n### `add``Update``Content(content, contentType)`\n\nAdds the specified content to the draft body. The type of the `content` is specified by\n[ContentType](/apps-script/reference/card-service/content-type).\n\n#### Parameters\n\n| Name | Type | Description |\n|-----------------|-----------------------------------------------------------------|-------------------------------------------------|\n| `content` | `String` | The content to insert to the email draft. |\n| `content``Type` | [ContentType](/apps-script/reference/card-service/content-type) | The content type of the content to be inserted. |\n\n#### Return\n\n\n[UpdateDraftBodyAction](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Update``Type(updateType)`\n\nSets the [UpdateDraftBodyType](/apps-script/reference/card-service/update-draft-body-type) of this update action on the draft body. For example,\ninserting content at the start, end, or cursor position of the draft body.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------------|-----------------------------------------------------------------------------------|-------------------------------------------------------|\n| `update``Type` | [UpdateDraftBodyType](/apps-script/reference/card-service/update-draft-body-type) | The type of update to be performed on an email draft. |\n\n#### Return\n\n\n[UpdateDraftBodyAction](#) --- This object, for chaining."]]