Skip to content

fix: validate system email before invitations#613

Open
tongshiyuan wants to merge 1 commit into
dataelement:mainfrom
tongshiyuan:invite-email-preflight
Open

fix: validate system email before invitations#613
tongshiyuan wants to merge 1 commit into
dataelement:mainfrom
tongshiyuan:invite-email-preflight

Conversation

@tongshiyuan
Copy link
Copy Markdown

Summary

Fix member invitations reporting success when system email is disabled.

SMTP test emails can succeed even when SYSTEM_EMAIL_ENABLED is false, because the test endpoint
intentionally allows disabled-but-configured SMTP settings. The invitation flow uses normal system email
delivery, so it skipped sending but still returned a success response.

This change adds a preflight check before creating invitation codes. If SMTP is configured but system
email is disabled, the API now returns a clear 400 error instead of silently skipping delivery.

Checklist

  • Tested locally
  • No unrelated changes included

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