Link Search Menu Expand Document

Mail Assistant

Table of Contents

  1. WARNING
  2. Install Mail Assistant
    1. Requirements
    2. Install
  3. Example Drafts Actions
  4. URL Scheme
    1. /sendMail
  5. Technical Details

WARNING

Some details of Mail Assistant may be changed with feedback. Check back here for updates if you have issues with the app.

Mail Assistant is a very basic helper app for Mac that serves a single purpose: To make it possible to send email using methods available to iOS apps which are not available on the Mac. The primary functionality this exposes is the ability to compose an email message using raw HTML—which is extremely useful if you like to compose emails in Drafts using Markdown, and convert them to HTML rich text to send.

Drafts Mail action step is able to use these APIs natively on iOS with the “Send as HTML” feature enabled. By using Mail Assistant via URL schemes, these same features can be used on Mac.

mail-assistant

Mail Assistant can be launched and used to send emails directly, but its main purpose is to be used as a companion to Drafts to enable HTML mail on Mac. It functions via x-callback-url, so can be used from other automation apps if desired. URL scheme documentation is below.

Install Mail Assistant

Mail Assistant is free to use.

Requirements

  • macOS 10.15 (Catalina) or greater
  • Mac OS Mail app must be configured with at least one valid email account to send mail.

Install

  • Download Mail Assistant (v0.1.3, Released 2020-11-16)
  • Drag Mail Assistant to your /Applications folder.
  • Install an example action in Drafts (below) and test.

Example Drafts Actions

  • Markdown Mail (w/ Mail Assistant): This example provides a single action which will work on Mac or iOS to send rich-text email from Markdown. On iOS it will use the Mail action step which has always been available. On Mac, it will use the Mail Assistant app.

URL Scheme

Mail Assistant registers the mail-assistant URL scheme, and offers the following action:

/sendMail

Opens Mail Assistant to an email compose window, pre-filled with the values provided. The use can edit, add recipients, etc., and click “Send” to complete and send the email. On send, Mail Assistant will quit itself.

Recipient arguments (to, cc, bcc) all take a comma-separated list of recipients, which can be raw email addresses, or name addresses in the format Joe Smith <joe@smith.com>.

This action is fully x-callback-url compliant, and accepts x-success, x-cancel and x-error URL arguments to be opened on completion of the action.

  • Arguments
    • to [string, optional] : A comma-separated list of recipients for the TO: field.
    • cc [string, optional] : A comma-separated list of recipients for the CC: field.
    • bcc [string, optional] : A comma-separated list of recipients for the BCC: field.
    • subject [string, optional]: Subject line
    • body [string, optional] : Body content for the email. If the html argument is “true”, this string should be HTML, otherwise plain text content.
    • from [string, optional] : Email address to use as the “from” address. If the email does not match and email address configured in Mail.app, this value will be ignored and the default address used.
    • html [boolean, optional] : If “true”, the body argument will be assumed to be HTML.
  • Examples
    • mail-assistant://sendMail?subject=Test&body=My%20encoded%20content

Technical Details

Mail Assistant is a Catalyst app, and sends mail using the MFMessageComposeViewController from UIKit’s MessageUI framework.


Download on App Store Download on Mac App Store

© 2012-2020 by Agile Tortoise, Inc.
Drafts is a registered Trademark of Agile Tortoise, Inc.
Privacy | Terms