RocketChat/Rocket.Chat · error · Error
user-without-verified-email
Error message
user-without-verified-email
What it means
sendTestEmailToInbox needs a destination and picks the first verified address from the calling user's emails. If user.emails contains no entry with verified:true, it throws 'user-without-verified-email' (a plain Error). The guard is strict because sending a test to an unverified address would bounce or be spam-flagged.
Source
Thrown at apps/meteor/server/features/EmailInbox/EmailInbox_Outgoing.ts:338
delete message.urls;
return message;
},
callbacks.priority.LOW,
'ReplyEmail',
);
export async function sendTestEmailToInbox(emailInboxRecord: IEmailInbox, user: IUser): Promise<void> {
const inbox = inboxes.get(emailInboxRecord.email);
if (!inbox) {
throw new Error('inbox-not-found');
}
const address = user.emails?.find((email) => email.verified)?.address;
if (!address) {
throw new Error('user-without-verified-email');
}
void sendEmail(inbox, {
to: address,
subject: 'Test of inbox configuration',
text: 'Test of inbox configuration successful',
});
}
View on GitHub (pinned to b2c16d5842)
Solutions
- Add an email address to your user profile and verify it via the confirmation link
- Resend the verification email from the profile page if it was never confirmed, then retry the test
- As a smoke test, use Administration > Email > send test mail instead, which does not depend on the user's verified address
Example fix
// before
await sendTestEmailToInbox(inboxRecord, currentUser);
// after
const hasVerified = Boolean(currentUser.emails?.some((e) => e.verified));
if (!hasVerified) {
throw new Error('Verify an email address on your profile before testing the inbox');
}
await sendTestEmailToInbox(inboxRecord, currentUser); Defensive patterns
Strategy: validation
Validate before calling
const verifiedAddress = user.emails?.find((e) => e.verified)?.address;
if (!verifiedAddress) {
throw new Error('Add and verify an email address on your profile first');
}
await sendTestEmailToInbox(inboxRecord, user); Type guard
const hasVerifiedEmail = (u: { emails?: Array<{ address: string; verified?: boolean }> }): boolean =>
Boolean(u.emails?.some((e) => e.verified)); Try / catch
try {
await sendTestEmailToInbox(inboxRecord, user);
} catch (e) {
if (e instanceof Error && e.message === 'user-without-verified-email') {
// direct the user to profile > email verification, then retry
}
} Prevention
- Disable the test-send button unless the acting user has a verified email
- For admin/LDAP-provisioned accounts, include email verification in onboarding
When it happens
Trigger: An admin with no email on their profile clicks 'send test email to inbox'; the profile has only unverified addresses; the verification was never completed.
Common situations: Admin accounts created via LDAP/SCIM without email verification; test drive before verifying the just-added address; verification email lost in spam.
Related errors
- error-invalid-email
- CustomOAuth: emailPath is required
- CustomOAuth: Failed to extract email
- error-invalid-email
- invalid email
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/3025ab7eca3903d2.
Report an issue: GitHub.