Draft Email Messages
Allow your users to save draft emails securely
Creating a Draft Email Message
// Obtain the input RFC 822 data and sender email address id however makes sense for your implementation.
const rfc822Data: ArrayBuffer = // ...
const senderEmailAddressId = senderEmailAddress.id
try {
const draftMetadata = await emailClient.createDraftEmailMessage({
rfc822Data,
senderEmailAddressId,
})
// `draftMetadata` is the metadata associated with the saved
// draft email message including the id you can use this to access or
// update the draft.
} catch (e) {
// Handle/notify user of errors
}// Obtain the input RFC 822 data and sender email address id however makes sense for your implementation.
let rfc822Data: Data = // ...
let senderEmailAddressId = senderEmailAddress.id
let input = CreateDraftEmailMessageInput(
rfc822Data: rfc822Data,
senderEmailAddressId: senderEmailAddressId
)
do {
let draftMetadata = try await emailClient.createDraftEmailMessage(
withInput: input
)
// `draftMetadata` is the `DraftEmailMessageMetadata` associated with the saved
// draft email message including the id which you can use to access or
// update the draft.
} catch {
// Handle/notify user of errors
}Updating a Draft Email Message
Deleting Draft Email Messages
Status
Definition
Retrieving Draft Email Messages
Single Draft Email Message by Id
List of All Draft Email Messages [Deprecated]
List of Draft Email Messages for an Email Address
List of All Draft Email Message Metadata [Deprecated]
List of Draft Email Message Metadata for an Email Address
Last updated