Skip to content

Writing a message: compose, reply, forward and drafts in Inbox

Describes Inbox 0.5.0.

The compose page is where you write a new message, a reply or a forward, and where you finish a saved draft.

Where to find it

On the Inbox page (Mail > Inbox), click New message, or open a message and click Reply, Forward or, on a draft, Edit draft. Compose has no sidebar entry of its own; its address is /admin/inbox/compose. You need the Mail permission and write access to at least one mailbox: your personal one always counts. Without one the page says You don’t have any mailbox you can send from.

The Inbox compose form: To, Cc, Bcc, Subject and Message, Upload files, Attach existing file, Cancel, Save draft and Send The Inbox compose form: To, Cc, Bcc, Subject and Message, Upload files, Attach existing file, Cancel, Save draft and Send

Writing a message.

The form

  • From: which mailbox the message goes out of. It shows only when you can write from more than one, such as a shared mailbox. Changing it after saving a draft starts a new draft in the other mailbox; the first one stays in its Drafts folder.
  • Send as: shows only when sending to outside addresses is turned on for the site and there is a sender you may use. Inside the application only is the first choice, so outside mail is never the default.
  • To, Cc, Bcc: type @username, an email address or a shared mailbox, comma separated. The fields suggest shared mailboxes and colleagues as you type. Bcc recipients get the message but don’t appear in anyone else’s list.
  • Reply-To: shows when there’s more than one choice: your own email and the address of each shared mailbox you can write to. No Reply-To — replies go to this mailbox appears when the sending shared mailbox has no address.
  • Subject and Message. The text is Markdown, as the hint under it says: Markdown: **bold**, _italic_, link, - lists.
  • Signature: shows when the sending mailbox has signatures. The default one is added at the end of the text after a -- line. Picking another, or No signature, swaps it, as long as you haven’t edited it. If you have, the page says The signature in the message was edited, so it was left as it is.

Only people who use Inbox can be addressed: by default, users whose role has the Mail permission, and the Owner. A name that matches nobody stops the send with No recipient matches: …. Use @username, an email address, or a shared mailbox name. Nothing is sent until every recipient is found.

Attachments

  • Upload files: pick files from your computer. They stay in the page until you save the draft or send; leaving the page stores nothing.
  • Attach existing file: opens the media picker on your own Media files. Owners and Admins see the whole library.

Each file shows as a chip with its name and size; the × removes it. A message carries at most 50 files. Each file has an upload limit set for the site (200 MB unless changed). Sent files are kept as copies in a Mail attachments library, so editing or deleting the original later doesn’t change what the recipients get. Only the sender and the people who hold a copy of the message can download them.

Saving, sending and discarding

  • Save draft: saves the message in your Drafts folder and says Draft saved. Later saves update the same draft.
  • Send: sends it, says Message sent. and opens the Sent folder of the mailbox it went from. Sending a draft turns that draft into the sent message.
  • Discard draft: shows once the draft has been saved. It asks Discard this draft? and deletes it.
  • Cancel: goes back to the mailbox without saving.

While a save or send runs, the buttons wait for it. Each recipient gets an in-app notification that links to the message; people can turn these off under the Inbox notification type.

Writing to outside addresses

An email address that belongs to nobody on the site and to no shared mailbox is sent as a real email, if all of this holds:

  • sending to outside addresses is turned on for the site (it is off by default);
  • you chose a sender under Send as;
  • you have the Send to external addresses permission, or you send as a sender of your own.

Otherwise the send stops, for example with Choose a sender under “Send as” to write to addresses outside this application. or Sending to addresses outside this application is turned off. When it goes, the page says Message sent. The email to external addresses is on its way. and the email follows a moment later. The message itself is already in your Sent folder; the reading pane shows how each outside address did.

What it doesn’t do

  • It doesn’t send outside email by default: a developer must turn it on (see below).
  • It doesn’t save drafts on its own: only Save draft saves.
  • Attachments to outside addresses travel as real files only up to a total size (25 MB by default); a larger message is refused before anything is stored.

For developers

Outside mail needs both the setting and an outbound filter in your config:

PhoenixKitInbox.set_external_enabled(true)
config :phoenix_kit_inbox, outbound_filter: {MyApp.Inbox, :outbound}   # or :none

The upload limit is the inbox_max_upload_bytes setting; the outside attachment limit is inbox_external_max_bytes. Who counts as addressable can be replaced with config :phoenix_kit_inbox, recipient_filter: {MyApp.Inbox, :addressable?}.