Class UpdateDraftBodyAction

  • UpdateDraftBodyAction updates the body of an email draft.

  • It provides methods to add content (addUpdateContent) and set the update type (setUpdateType).

  • addUpdateContent inserts specified content, determined by ContentType, into the email draft.

  • setUpdateType defines how the content is inserted, such as at the beginning, end, or cursor position, using UpdateDraftBodyType.

UpdateDraftBodyAction

Updates the email draft body.

Methods

MethodReturn typeBrief description
addUpdateContent(content, contentType)UpdateDraftBodyActionAdds the specified content to the draft body.
setUpdateType(updateType)UpdateDraftBodyActionSets the UpdateDraftBodyType of this update action on the draft body.

Detailed documentation

addUpdateContent(content, contentType)

Adds the specified content to the draft body. The type of the content is specified by ContentType.

Parameters

NameTypeDescription
contentStringThe content to insert to the email draft.
contentTypeContentTypeThe content type of the content to be inserted.

Return

UpdateDraftBodyAction — This object, for chaining.


setUpdateType(updateType)

Sets the UpdateDraftBodyType of this update action on the draft body. For example, inserting content at the start, end, or cursor position of the draft body.

Parameters

NameTypeDescription
updateTypeUpdateDraftBodyTypeThe type of update to be performed on an email draft.

Return

UpdateDraftBodyAction — This object, for chaining.