Skip to content

sendEmail: support calendar invites (a text/calendar part) #876

Open

Description

@joeblew999

We send event emails from a Void app (booking confirmations, cancellations), and we'd like each one to carry a calendar invite, so Gmail and Outlook show Yes/No/Maybe and add, update or cancel the event in the calendar.

Today the only way is to attach an .ics file. The standard for invites by email (RFC 6047) expects the invite as a text/calendar; method=REQUEST (or CANCEL) part alongside the text and HTML in multipart/alternative. Outlook in particular can show an attached .ics as a plain file instead of an invite.

buildMime already builds the alternative part from text and HTML (mime.ts#L1359), so this could be one optional field:

await sendEmail({
  to, from, subject, text, html,
  calendar: { method: 'REQUEST', content: icsText }, // e.g. from ical-generator
});

It would be added as a third alternative part, text/calendar; method=…; charset=UTF-8, with the attachments wrapped around it as now.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions