Skip to content

Interface: EmailComposeProps

Props for EmailComposeView.

optional allowAttachments?: boolean

Show the attachment control. Defaults to true.


optional defaultFrom?: string

Preselected From. Defaults to the first senders entry.


optional defaultValue?: Partial<{ attachments?: object[]; bcc?: string[]; body: string; cc?: string[]; subject: string; to: string[]; }>

Initial draft to seed the form (uncontrolled thereafter).


optional disabled?: boolean

Disable all actions regardless of pending state.


optional onCancel?: () => void

Called when the user cancels. Omit to hide the Cancel button.

void


optional onChange?: (message) => void

Called on every edit with the current assembled message.

object[] = ...

string[] = ...

string = ...

string[] = ...

string = ...

string[] = ...

void


optional onSend?: (message, from?) => void | Promise<void>

Called when the user submits; receives the message and chosen From.

object[] = ...

string[] = ...

string = ...

string[] = ...

string = ...

string[] = ...

string

void | Promise<void>


optional pending?: boolean

Disable actions while a send is in flight.


optional senders?: string[]

Permitted From addresses (e.g. from the plugin’s GET /senders). When non-empty a From dropdown is shown and its value is passed to onSend; omit for a server-resolved sender (no dropdown).


optional sendLabel?: string

Submit button label. Defaults to “Send”.


optional title?: string

Card header label. Defaults to “New message”.