iOS shortcut for sending an email
It should be possible to automate proton email sending via iOS shortcuts app in the same way as it works for the Apple Mail app.
Example workflow:
1. Select Files — lets the user pick one or more files.
2. Send Email — prefilled like:
• Body text: “Hello, here’re my attachments:” and then an embedded File token (the file(s) selected above).
• Fields in the action header: with Subject and to Recipients (both are parameter “chips”).
• Extra fields shown:
• From: (optional)
• Cc: (email addresses)
• Bcc: (email addresses)
• A toggle: Show Compose Sheet (checked), meaning it will open the composer UI instead of silently sending.
⸻
Feature requirements:
1) Shortcuts actions (must-have)
Action: “Send Email (via )”
• Inputs
• To (list of email addresses or contacts)
• Subject (text)
• Body (text; supports inserting variables/tokens from previous steps)
• Attachments (0..n files; accepts Shortcuts “File” type and multiple selection)
• Cc (list)
• Bcc (list)
• From Account (optional; select from configured accounts/aliases)
• Show Compose Sheet (boolean; default true to match screenshot)
• Behavior
• If Show Compose Sheet = true: open your app’s composer prefilled; user can edit and hit Send.
• If Show Compose Sheet = false: send silently in the background (or fail with a clear error if iOS disallows in that state).
• Outputs
• Result (success/failure)
• Message ID (if available)
• Error (human-readable + a code for automation handling)
Action: “Compose Email” (optional but nice)
• Always opens composer, returns draft id.
2) Attachment handling
• Accept multiple files from “Select Files” and attach all.
• Preserve file names + MIME types.
• Support common types: PDF, images, video, ZIP, text, Office docs.
• Handle large files:
• configurable limit + clear errors
• optional “upload link instead of attach” mode (if your app supports it)
3) Recipient + address resolution
• Allow recipients from:
• raw emails
• Contacts
• lists passed in from earlier Shortcut steps
• Validate addresses; fail gracefully with which address is invalid.
4) Account / identity selection
• From maps to:
• chosen mailbox (IMAP/SMTP account) or
• alias identity (Reply-To / Sender if supported)
• If not provided: use default account.
5) UX parity with Shortcuts “chips”
• Parameters must appear as editable token fields in Shortcuts (like “Subject”, “Recipients”, and the File token embedded in the body).
• Support variable insertion in body/subject (e.g., file name, date, clipboard text).
6) Reliability + privacy
• Clear permission prompts (Contacts access only if needed).
• No sending until user explicitly allows silent sending (or require compose sheet).
• Don’t retain attachments beyond sending unless user opts in.
• Return deterministic errors so automations can branch (e.g., “NoAccountConfigured”, “Offline”, “AuthExpired”, “AttachmentTooLarge”).
7) Platform implementation notes (so it actually works)
• Implement via App Intents (so actions show up in Shortcuts properly).
• Support running while locked where possible (otherwise explain limitation via error + suggest compose sheet).