How does OTP extraction work?
Sign-up, two-factor and password-reset mail all carry the same few things: a code, a verify link, a magic-login link or a reset link. Extracting them on the server spares every test suite and agent its own regular expressions, which break when a sender changes its template.
Waiting matters as much as extracting. Polling an inbox every few seconds is slow and flaky in CI; a long-poll that returns as soon as a matching message arrives removes both the sleep and the race.
"otps": [{ "code": "482913", "source": "body" }],
"links": [{ "url": "https://example.com/verify?t=…", "kind": "verify" }] How does nofeb use OTP extraction?
- Every message nofeb stores carries
otps(each code with whether it came from the subject or the body) andlinksclassified as verify, magic_login, password_reset, unsubscribe or other. wait_for_emaillong-polls an inbox for up to a minute, filtered by sender, subject orhas_otp, and returns the message with those fields already filled. Passsinceso a code that arrived while the form was submitting is not missed.
Frequently asked questions
How do I read an email OTP in Playwright or Cypress?
Create a disposable inbox per test, type its address into the form, then call wait_for_email with has_otp=true and read otps[0].code. See the Playwright guide for a complete test.
What if the email has a link instead of a code?
Read links and pick the one whose kind is verify or magic_login.
Status of everything on this page
Every capability named above, with its status as reconciled against the engine.
| Capability | What it does | Status |
|---|---|---|
| One-time code and link extraction | Verification codes and classified links are pulled out of every message and returned as fields. | Shipped |
| Wait for an email | Long-poll an inbox for up to a minute until a message matching sender, subject or has-a-code arrives. | Shipped |
| Disposable inboxes with a time to live | Give an inbox a lifetime in seconds; it and its mail are removed when it expires, and an event says so. | Shipped |