Skip to content

fix: await SMTP send to prevent emails from being silently dropped#511

Merged
cyrilledaily merged 1 commit intomainfrom
fix/await-smtp-send
Feb 18, 2026
Merged

fix: await SMTP send to prevent emails from being silently dropped#511
cyrilledaily merged 1 commit intomainfrom
fix/await-smtp-send

Conversation

@cyrilledaily
Copy link
Collaborator

Summary

  • Critical bug fix: sendMailPromise() was called without await in trySendMail(), causing the Next.js serverless function to return the HTTP response and terminate before nodemailer completed the SMTP handshake. Emails were never actually delivered despite the API responding with 200 OK.
  • Adds console.error logging on SMTP failures so issues are visible in Clever Cloud production logs.

Context

This bug existed before PR #507 and was identified during its review, but #507 was merged before the fix could land. This is a standalone hotfix targeting main.

Changes

One line change in front/utils/emails/send-email.ts:

- sendMailPromise(mailOptions);
+ await sendMailPromise(mailOptions);

Test plan

Made with Cursor

sendMailPromise was called without await in trySendMail, causing the
Next.js serverless function to return the HTTP response and terminate
before nodemailer completed the SMTP handshake. Emails were never
actually delivered despite the API responding with 200 success.

Also adds console.error logging on SMTP failures for production
diagnostics.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Contributor

:octocat: Preview is deploying...

Please wait while the preview is deploying on Clever Cloud...

ℹ️ Name 🔗 Infos & links
🌱 Deploying commit f732289
👁️ Preview Generating preview app...

@cyrilledaily cyrilledaily merged commit 6e85028 into main Feb 18, 2026
2 of 3 checks passed
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