Skip to content

Calendar, Spreadsheet, Signatures: send as the account's senderEmail - #258

Merged
Salazareo merged 3 commits into
mainfrom
DS/team-sender-email
Nov 30, 2026
Merged

Salazareo merged 3 commits into
mainfrom
DS/team-sender-email

Conversation

@Salazareo

@Salazareo Salazareo commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Mail these apps send in a user's name now uses senderEmail from puter.auth.getUser(): a team account's <username>@puter.email, otherwise the account email once confirmed. Depends on HeyPuter/puter#4805 (whoami senderEmail).

A team account whose email was never confirmed couldn't send calendar invitations: the client named the unconfirmed email as organizer and the email worker refused it with organizer_mismatch.

Calendar

  • Invitations, cancellations and booking confirmations name senderEmail as organizer, and the caller's own guest entry is rewritten to it. Stored events and invitation digests aren't changed.
  • Updates and cancellations keep the organizer guests were first mailed (now recorded in the sent log). For logs from before this change, the exception is an unconfirmed email, which can no longer send.
  • Email worker v14:
    • senderEmail counts as the caller's address, and the account email counts only when confirmed.
    • An organizer/attendee address that is the caller's unconfirmed email is refused with detail: 'email_unconfirmed', and the app shows a confirm-your-email message.
    • A REPLY's ATTENDEE must be the authorized attendee.
  • RSVP worker v33: booking mail reads the host's addresses from the worker owner's session, not the synced config.
    • Guests see senderEmail.
    • The host's own notices go to the confirmed email, else senderEmail.
    • Without either, the booking still succeeds and the guest gets a PUBLISH.
  • RSVP links: guest pages show the host as senderEmail. Stored link digests change only for hosts whose shown organizer changes, so other hosts don't resync every event.
  • Replies with no recorded invite attendee answer as senderEmail, then the confirmed email, then the Puter mailbox.

Spreadsheet: email worker v2 sets Reply-To from the session (senderEmail, else the confirmed email) and leaves it out otherwise.

Signatures: email worker v4 takes the sender's address from the session.

  • ownerEmail is no longer sent in the request body, and a forged one is ignored.
  • Owner notices go to the confirmed email, else senderEmail.
  • An owner notice is refused (owner_email_unavailable) when the session names neither, instead of going to the address in the request.

Auth callout: all three workers, and the per-user RSVP worker, now derive sender and recipient-of-own-notice addresses from a session instead of the client.

Rollout

  1. Merge and deploy feat(auth): whoami names the address to send mail as (senderEmail) puter#4805.
  2. Run npm run deploy:email-worker in calendar, spreadsheet and signatures. The app redeploys each user's RSVP worker on the version bump. Deploy the signatures worker before its app change, since the app stops sending ownerEmail.
  3. Merge this.

Until step 1 is live:

  • Calendar still refuses team accounts with unconfirmed emails, now with the confirm message.
  • Spreadsheet and signatures leave out Reply-To / sender for unconfirmed accounts.

Tests

  • Calendar: 1903 pass.
  • Signatures: 381 pass.
  • Spreadsheet: the mail tests pass (32).

Mail sent in a user's name uses whoami's senderEmail: a team account's
<username>@puter.email, otherwise the confirmed account email.

- Calendar: invitations, cancellations and booking confirmations name
  senderEmail as organizer. The email worker (v14) accepts it as the
  caller's address and refuses an unconfirmed email with detail
  'email_unconfirmed', which the app shows as a confirm-your-email message.
  The RSVP worker (v33) sends host notices to the booking's notifyEmail
  when the organizer guests see is another address.
- Spreadsheet: the email worker (v2) sets Reply-To from the session
  instead of trusting an unconfirmed email.
- Signatures: the email worker (v4) reads the sender's address from the
  session; the request body no longer carries ownerEmail.
…sion

- Workers use the account email only when whoami marks it confirmed.
- Calendar email worker: a REPLY's ATTENDEE must be the authorized attendee.
- Calendar invites: updates and cancellations keep the organizer guests were
  first mailed, unless it's an unconfirmed email that can no longer send.
- RSVP worker: booking mail reads the host's addresses from the owner session
  instead of the synced config. Guests see senderEmail; the host's own
  notices go to the confirmed email, else senderEmail.
- RSVP links: guest pages show senderEmail for the host. Digests change only
  for hosts whose shown organizer changes.
- Signatures: owner notices go to the confirmed email, else senderEmail, and
  are refused when the session names neither.
Tracing spreadsheet's ~3,500 test files peaks just over Node's default
heap, so every affected-mode spreadsheet run ran out of memory, on main
too (4942b16, 9be3a2c). Full-mode nightly runs were unaffected.
@Salazareo
Salazareo merged commit d7ff96e into main Nov 30, 2026
57 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant