Disposable Email
Create and read temporary Mail.tm inboxes for testing email flows.
Use bundled scripts
Create inbox + token:
python3 scripts/create_inbox.py- Returns JSON with
address,password,token,accountId,domain.
List messages:
python3 scripts/read_inbox.py --token <TOKEN> --list
Read latest message:
python3 scripts/read_inbox.py --token <TOKEN> --latest
Wait for OTP from incoming mail:
python3 scripts/read_inbox.py --token <TOKEN> --wait-otp --timeout 120 --interval 3- Default OTP regex:
\\b(\\d{4,8})\\b - Override regex with
--otp-regex.
End-to-end (create inbox + wait for first message/OTP):
python3 scripts/e2e_otp.py --timeout 120 --interval 3- First line emits
inbox_createdJSON (address/password/token). - Then emits one of:
otp_found,message_received_no_otp, ortimeout. - Add
--save ./otp-result.jsonto persist the latest emitted result to disk.
Workflow
- Run
create_inbox.pyand share the generated email address. - Trigger email delivery to that address.
- Poll with
read_inbox.py(--latestor--wait-otp). - Return sender, subject, createdAt, and message text/OTP.
Notes
- Free temp domains can be blocked by some production services.
- Keep token private; treat it like mailbox access credentials.
- Prefer stable paid inbox providers for CI if reliability is critical.