Send script — the mail DSL

The C# script DSL the Email page runs on the kernel for Send and Save as Outlook draft, and for the Preflight that runs before either: Mail.From(record).WithAttachment(a => a.FromNode(path).AsPdf(name)).AsUser(you).ApprovedBy(...).Send(), .SaveAsDraft() or .Preflight(). Preflight loads the mail runtime (Microsoft Graph, Kiota, Azure.Core, Markdig) by building a client it never uses, reads the record and every linked attachment, and mints the user's delegated token — and sends, exports and writes nothing. Send and Save as Outlook draft read the record, export every attachment to PDF through the platform's export activity, obtain the user's delegated Graph credential, build ONE message in the user's own mailbox with To, Cc, subject, the body rendered from markdown and the PDFs, then send it and stamp the record — or leave it in Outlook's Drafts and stamp the link — and verify the stamp by read-back. Every Graph type lives in MailRuntime and GraphMail only, so a kernel that cannot load Graph fails with a named [mail-runtime-unavailable] error before anything is exported. The page prepends this text to the plan it composes and writes the whole as {message}/Script or {message}/Preflight; not executable on its own.

Reconnecting…
The connection to the server was interrupted. Trying to restore it…
Trying again…
The connection could not be restored. Reloading the page…
The server was updated. Reloading the page to pick up the latest version.