Email: Invitation Flow (CalDAV Callback)¶
Event invitations require a multi-step flow across four components.
Full Flow¶
User creates event with attendee in Calendars UI
│
▼
Calendars Frontend → Caddy → Calendars Backend → CalDAV Server
│
(event saved with
attendees in ICS)
│
▼
CalDAV HttpCallbackIMipPlugin
sends scheduling callback:
POST http://172.29.0.30:8000/
api/v1.0/caldav-scheduling-callback/
Headers: X-LS-Api-Key, X-LS-Sender,
X-LS-Recipient, X-LS-Method,
X-LS-Is-Mailbox
│
▼
Calendars Backend receives callback
│
If X-LS-Is-Mailbox: true →
sends via Messages API submit endpoint
│
If no mailbox →
sends via Django email backend (Brevo SMTP)
│
▼
Attendee receives email with:
- ICS attachment
- Accept/Maybe/Decline RSVP links
Key Headers¶
CalDAV sends these headers in the callback:
| Header | Value |
|---|---|
X-LS-Api-Key |
CALDAV_INBOUND_API_KEY |
X-LS-Sender |
Organizer email (mailto: format) |
X-LS-Recipient |
Attendee email |
X-LS-Method |
REQUEST, REPLY, or CANCEL |
X-LS-Is-Mailbox |
true when calendar is linked to Messages mailbox |
Requirements for Invitations to Work¶
CALDAV_CALLBACK_BASE_URLpoints to Calendars backend static IP (172.29.0.30:8000)172.29.0.30in CalendarsDJANGO_ALLOWED_HOSTSCALDAV_INBOUND_API_KEYmatches between CalDAV server and Calendars.envtranslations.jsonmounted at/data/translations.jsonin Calendars backend- Messages API channel configured with
messages:sendscope - Brevo SMTP or Messages API accessible from Calendars backend
Translations File¶
The invitation service reads translations for email subject lines. Without this file, invitations fail with:
Get the file from the Calendars source repo and mount it: