MessageResource

Provides operations for managing email messages: list, get, update, send, reply, reply-all, forward, retrieve attachments, and get raw content.

Functions

Link copied to clipboard
suspend fun forward(messageId: String, block: ForwardMessageBuilder.() -> Unit): SendMessageResponse

Forwards a message to new recipients.

Link copied to clipboard
suspend fun get(messageId: String): Message

Retrieves a message by ID.

Link copied to clipboard
suspend fun getAttachment(messageId: String, attachmentId: String): AttachmentData

Retrieves a message attachment's binary data.

Link copied to clipboard
suspend fun getRaw(messageId: String): RawMessageResponse

Retrieves the raw RFC 2822 content of a message.

Link copied to clipboard
suspend fun list(block: ListMessagesBuilder.() -> Unit = {}): MessageList

Lists messages with optional pagination and filtering.

Link copied to clipboard
suspend fun reply(messageId: String, block: ReplyBuilder.() -> Unit): SendMessageResponse

Sends a reply to a specific message.

Link copied to clipboard
suspend fun replyAll(messageId: String, block: ReplyAllBuilder.() -> Unit): SendMessageResponse

Sends a reply-all to a specific message.

Link copied to clipboard
suspend fun send(block: SendMessageBuilder.() -> Unit): SendMessageResponse

Sends a new email message.

Link copied to clipboard
suspend fun update(messageId: String, block: UpdateMessageBuilder.() -> Unit): UpdateMessageResponse

Updates a message by ID.