Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Dispatch registers the x-dispatch:// URL scheme and provides one public action: compose.

/compose overview

Launches Dispatch with the composer screen prefilled using information provided in the parameters below.

from

Optional. Specifies the email address of the account to compose the new mail from. If there are more than one account configured in Dispatch, and no valid from account is provided, Dispatch will default to using the first account configured in Dispatch to compose the mail.

subject

Optional. Specifies the subject of the email.

body

Optional. Specifies the plain text body of the email.

to

Optional. Comma-separated list of email addresses to be populated in the 'To:' field of the email.

cc

Optional. Comma-separated list of email addresses to be populated in the 'Cc:' field of the email.

bcc

Optional. Comma-separated list of email addresses to be populated in the 'Bcc:' field of the email.

Example

The following URL is broken up with line breaks to illustrate the parameters.

x-dispatch:///compose?
from=hello@dispatchapp.net
&subject=Hello%20from%20Dispatch
&to=test@cleanshavenapps.com,random@dispatchapp.net
&cc=cc@cleanshavenapps.com
&body=Hello%20world%2C%0A%0AThis%20is%20an%20email%20composed%20with%20the%20Dispatch%20%2Fcompose%20URL%20scheme.%0A%0A%E2%80%94%20Dispatch

Note

Please take note of the triple /// in x-dispatch:///compose when using the URL scheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.