Skip to content

sendNewTicketAdminNotification sends to E2E test addresses #816

Description

@stickerdaniel

Every sender in src/lib/convex/emails/send.ts calls shouldSkipTestEmail before resend.sendEmail, except sendNewTicketAdminNotification: sendVerificationEmail (:53), sendResetPasswordEmail (:91), sendAdminReplyNotification (:132), sendNewUserSignupNotification (:249) and sendFounderWelcomeEmail (:390) all guard, while sendNewTicketAdminNotification (:173) goes straight to resend.sendEmail at :212.

Its recipients come from getNotificationTargetEmails in src/lib/convex/admin/support/notifications.ts:446, which returns every adminNotificationPreferences row with the matching toggle enabled. Any @e2e.example.com address that reaches that table (a test user promoted to admin, or a test address added as a custom recipient) therefore receives a real Resend send for every handoff, reopen and user reply, against a domain that cannot accept mail. The other five senders are protected from the same state.

The guard belongs before assertResendApiKey() so a test recipient costs nothing. A unit test asserting that no sender in the file reaches resend.sendEmail for a test address would keep the set complete as senders are added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions