BookStackApp/BookStack · error · UserInviteException

{$exception->getMessage()}

Error message

{$exception->getMessage()}

What it means

Generic sentinel rethrow in UserInviteService::sendInvitation: any exception raised while delivering the UserInviteNotification email (typically mail transport failure) is converted into a UserInviteException carrying the original message, so invite dispatch failures surface as a single user-facing error type.

Source

Thrown at app/Access/UserInviteService.php:26

class UserInviteService extends UserTokenService
{
    protected string $tokenTable = 'user_invites';
    protected int $expiryTime = 336; // Two weeks

    /**
     * Send an invitation to a user to sign into BookStack
     * Removes existing invitation tokens.
     * @throws UserInviteException
     */
    public function sendInvitation(User $user)
    {
        $this->deleteByUser($user);
        $token = $this->createTokenForUser($user);

        try {
            $user->notify(new UserInviteNotification($token));
        } catch (\Exception $exception) {
            throw new UserInviteException($exception->getMessage(), $exception->getCode(), $exception);
        }
    }
}

View on GitHub (pinned to 18f8469a1c)

Solutions

  1. Check mail server availability and SMTP credentials in .env (MAIL_HOST, MAIL_PORT, MAIL_USERNAME)
  2. Verify network/DNS connectivity to the mail provider
  3. Inspect the original exception message for transport-specific causes
  4. Retry the invitation send once mail delivery is restored
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at app/Access/UserInviteService.php:26 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BookStackApp/BookStack@18f8469a1c (2026-09-02). Data as JSON: /api/errors/4f9c1393709950f5. Report an issue: GitHub.