Skip to content

fix: validate system email before invitations#613

Merged
yaojin3616 merged 1 commit into
dataelement:mainfrom
tongshiyuan:invite-email-preflight
Jun 10, 2026
Merged

fix: validate system email before invitations#613
yaojin3616 merged 1 commit into
dataelement:mainfrom
tongshiyuan:invite-email-preflight

Conversation

@tongshiyuan

Copy link
Copy Markdown
Contributor

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

@yaojin3616 yaojin3616 merged commit 8a53778 into dataelement:main Jun 10, 2026
1 check failed
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.

2 participants