RocketChat / RocketChat/Rocket.Chat
Mailer API shows “email being sent” even when SMTP is not configured.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description
When SMTP is not configured under
Administration → Email → SMTP, the Mailer API still responds as if the email was successfully sent.
In reality, no email is delivered because the server lacks the required SMTP configuration. This leads to a false success response and creates confusion for admins.
From a UI/UX and API reliability perspective, Rocket.Chat should prevent the mailer workflow from proceeding when SMTP is not configured and instead return a clear, actionable error.
Current Behavior
Admin has not configured SMTP settings.
A request is made to POST /v1/mailer.
API responds with a success message.
No email is actually sent.
Expected Behavior
Before attempting to send an email, the server should verify that SMTP is properly configured.
If SMTP configuration is missing, the API should:
Stop the mailer workflow.
Return an error response indicating that SMTP is not configured.
Guide the admin to Administration → Email → SMTP to complete the setup.
Technical Flow
Current flow:
MailerPage.tsx
→ POST /v1/mailer
→ sendMail()
→ MailerSend()
→ Email.sendAsync()
Location:
apps/meteor/app/mailer/server/api.ts
Proposed Fix
Add a pre-check for SMTP configuration (e.g., presence of smtpHost) before calling Email.sendAsync().
If SMTP is not configured:
Return an error response instead of proceeding with the mailer flow.
Provide a clear message directing the admin to configure SMTP settings.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/meteor/app/mailer/server/api.ts and trace the POST /v1/mailer flow through sendMail(), MailerSend(), and Email.sendAsync(). Verify how SMTP configuration such as smtpHost is represented, then confirm that missing configuration stops the workflow and returns an actionable error directing admins to Administration → Email → SMTP.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100