These docs are for v0.1.0. Click to read the latest docs for v1.0.0.

Front.compose(options)

Open a new message. Will do nothing if an inbox cannot be selected. For example, if you try to compose to a Twitter handle, but have no Twitter inbox.

options: object

Field NameTypeDescription
from (optional)StringThe address of the channel that will be used to compose this message.
to (optional)String arrayAn array of recipients, that can be an email address, a phone number, or a Twitter handle.
cc (optional)String arrayAn array of recipients, that can be an email address, a phone number, or a Twitter handle.
bcc (optional)String arrayAn array of strings that represent recipients, that can be an email address, a phone number or a Twitter handle.
subject (optional)StringThe subject for emails.
body (optional)StringThe content of your message. If you have any, a signature will be appended.
attachment_uids (optional)Integer arrayAn array of attachment UIDs to attach to the new draft. UIDs can be found in the messages of the current selected conversation (UIDs not found in the conversation will be ignored).
hide_composer (optional)BooleanWhether or not to hide the composer for the new draft message (default to false).
Front.compose({
    from: '[email protected]',
    to: ['[email protected]'],
    cc: ['[email protected]'],
    subject: 'Optional subject',
    body: 'Optional body',
    attachment_uids: [],
    hide_composer: false
});