Test email addresses no longer receive email
- Category
- Product
- Published
With test mode on, Clerk no longer sends any email to +clerk_test addresses.
Test email addresses are addresses with the +clerk_test subaddress, such as jane+clerk_test@example.com. With Test mode enabled in the Clerk Dashboard, automated tests can sign in using the fixed verification code 424242 instead of reading a code from an inbox.
Until now, Clerk skipped only verification codes and new device sign-in notices for these addresses, and still delivered every other email to them, including sign-in links, invitations, and receipts. Most test addresses aren't real inboxes, so those emails bounced, and bounces from test traffic hurt email delivery for every development instance.
Starting today, Clerk doesn't send any email to a test email address while Test mode is on. Emails that Clerk used to deliver are still recorded and trigger the email.created webhook, with delivered_by_clerk set to false.
What to change
If your test suite reads emails from an inbox, for example to follow a sign-in link or accept an invitation, send those emails to an address without +clerk_test. Emails to real addresses are delivered as before and count toward the development instance email limit.
Tests that sign in with the code 424242 don't need any changes.