Skip to content

Add Expense - Invite Email Isn't Received #697

Closed

Description

@cryptelli

Describe the bug
I am encountering an issue where invite emails are not being sent to friends that are being added when entering an expense. The same issue is not experienced if I'm inviting via a group, the invitation email is received.

To Reproduce
Steps to reproduce the behavior:

  1. Go to "Add Expense"
  2. Click on "Search friends, groups or add email"
  3. Enter the email address of a new friend that hasn't been invited to SplitPro before.
  4. Click on "Send invite to user"

Expected behavior
An email is received by the person who was invited allowing them to login.

Screenshots
None that are applicable since the problem fails silently without any visible error that would indicate it had failed.

App version
v2.1.4

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Vivaldi
  • Version 8.0.4033.50 / Chromium Version 148.0.7778.273

Smartphone (please complete the following information):
N/A. Using the desktop browser version only.

Additional context
Signing into SplitPro via the magic link works fine.

Activity

  1. added theissue type on Aug 16, 2026
  2. added this to the 2.1.x milestone on Aug 16, 2026
  3. espen commented on Sep 19, 2026

    @espen

    From Claude:

    Root cause found — this is a wiring bug in src/components/AddExpense/SelectUserOrGroup.tsx.

    Both buttons in that component call the no-email handler:

    const handleAddEmailClickFalse = useCallback(() => onAddEmailClick(false), [onAddEmailClick]);
    // ...
    {enableSendingInvites && (
      <Button ... onClick={handleAddEmailClickFalse}>   // "Send invite" — but passes false
        <SendIcon ... />
        {t('...send_invite')}
      </Button>
    )}
    <Button ... onClick={handleAddEmailClickFalse}>     // "Add to SplitPro" — correctly false

    onAddEmailClick(false) results in inviteFriend being called with sendInviteEmail: false, so sendInviteEmail() in src/server/mailer.ts is never invoked — no send attempt, no error, nothing in the logs. That's why the group flow works (src/components/group/AddMembers.tsx correctly uses onClick={() => onAddEmailClick(true)} for its invite button) while the Add Expense flow silently skips the email.

    Fix: give the invite button a handleAddEmailClickTrue wired to onAddEmailClick(true) (currently at SelectUserOrGroup.tsx:152 on main).

    Verified on a fresh v2.1.5 self-hosted instance: clicking "Send invite" from Add Expense creates the placeholder user but the SMTP transport is never called (confirmed via the mail provider's outbound log — zero send attempts), while sign-in magic links and group-flow invites send fine. Related: #752 would at least have surfaced this if the send path errored, but here the send is never attempted at all.

  4. KMKoushik commented on Oct 13, 2026

    @KMKoushik
    Contributor

    Thanks for the detailed report, and thanks @espen for tracking down the root cause! The 'Send invite' button in Add Expense was wired to skip the email. This is fixed in #752 (commit 3aabfc2), which also shows an error toast if an invite fails to send. Please update to the next release that includes it, and reopen if you still don't receive invites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions