Repository navigation
Board invites: SMTP on port 2525 with a calendar part, API fallback - #107
Merged
Merged
Conversation
Invites sent through the Brevo API only carried invite.ics as a plain attachment, so Gmail didn't show them as invites (no Yes / Maybe / No). - Invites go out over Brevo SMTP on port 2525 (STARTTLS, BREVO_SMTP_LOGIN / BREVO_SMTP_KEY) with nodemailer's icalEvent: a "text/calendar; method=REQUEST" (or CANCEL) part, and the same .ics attached as invite.ics. Each SMTP attempt gives up after 15 seconds. - If SMTP isn't set up, fails or times out, the invite goes through the Brevo API as before. After one SMTP failure the rest of the batch goes straight to the API. The log says how many went each way. - inviteSetupProblem needs a sender plus SMTP or the API key. - The test invite box warns when the address is the organizer's: Gmail doesn't show RSVP buttons on an invite sent to its own organizer. - BOARD_INVITE_OUTBOX writes each invite as an .eml (the SMTP version) with the .ics next to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
Since #106, board meeting invites go through the Brevo HTTP API with
invite.icsas a plain attachment. The API can't send atext/calendar; method=REQUESTMIME part, so Gmail doesn't treat them as calendar invites: no Yes / Maybe / No and no "Add to calendar". We'd moved off SMTP because Railway blocks ports 587 and 465.The fix
SMTP on port 2525 first.
lib/board/invites.tssends with nodemailer tosmtp-relay.brevo.com:2525, with STARTTLS required andBREVO_SMTP_LOGIN/BREVO_SMTP_KEYas the login.icalEvent({ method: "REQUEST" | "CANCEL", content: ics }). That adds atext/calendar; method=…part and attaches the same .ics asinvite.ics, so I didn't add a second attachment.The Brevo API as the fallback.
3 sent (0 over SMTP, 3 through the Brevo API), and why SMTP was skipped.Organizer test warning. The "Send a test invite to" box shows: "Gmail won't show RSVP buttons on an invite sent to its own organizer. Use a different address to test." It shows whenever the address matches the organizer's in any capitalization. The box is still pre-filled with the organizer's address, so the warning shows until it's changed.
Setup.
inviteSetupProblemneeds a sender and either the SMTP login and key orBREVO_API_KEY. BOARD_SETUP.md and.env.exampleexplain thatBREVO_SMTP_LOGINandBREVO_SMTP_KEYare needed for full calendar invites, and that without them invites fall back to an attachment.Outbox mode.
BOARD_INVITE_OUTBOXnow writes each invite as an.eml, the SMTP version, with the.icsbeside it.nodemailer and
@types/nodemailerare back inpackage.json, at the same version as before #106.Tested (production build)
Outbox: each
.emlwas parsed with Python'semailpackage and the.icswithicalendar. Every email is text/plain + text/html +text/calendar+ oneapplication/icsinvite.icsattachment, and the attachment matches the calendar part.methodIn every case the part's
methodmatches the .ics METHOD.Each send path, using a test-only preload that sends
smtp-relay.brevo.com:2525to a local stand-in:text/calendar; method=REQUESTand the attachmentBrowser: the organizer warning shows for the organizer's address (any capitalization) and not for other addresses. No sideways scrolling at 390px.
Lint (no errors; 1 existing warning), typecheck and build pass.
Deploy notes
BREVO_SMTP_LOGINandBREVO_SMTP_KEYback in Railway (Brevo → SMTP & API → SMTP). Without them invites still go out, as attachments.Generated by Claude Code