Test Accounts for Security Testing: a Separate Email Address per Program
Give every bug bounty program or pentest engagement its own email address, read codes and reset links from a script, and delete the address when it ends.

A good test of an account flow needs mail. The sign-up confirmation, the password reset, the code sent to confirm a sign-in and the invite to a workspace all arrive in an inbox, and a tester has to open each one. When the inbox is the same one that holds your own correspondence, the work gets untidy fast: codes from five programs in one list, resets you need to find again next week, and accounts that tie back to an address you also use for everything else.
This guide shows a tidier way to set up test accounts for security testing. Each program or engagement gets its own Mailcycle address. A short script creates it, waits for the code your target sends, and deletes the address when the engagement ends. It works for security researchers, bug bounty hunters and application security teams alike.
Everything here is about authorized testing: your own application’s account flows, and accounts on programs and engagements where you have permission and stay inside the written scope. The example was run on a Mailcycle test account, and it triggers nothing outside that account.
Quick answer: one address per program, read by a script
Create an address named for the program, give the target’s sign-up form that address, and call mc.messages.waitFor() to receive the confirmation code. When the engagement is over, delete the address.
const since = new Date();
// ... submit the sign-up form of the in-scope target with tester.emailAddress ...
const mail = await mc.messages.waitFor({ inboxId: tester.id, since, subject: 'verification' });
const code = mail.text.match(/\b\d{6}\b/)?.[0];
The sections below build the whole script, explain how it sits beside the alias a bounty platform provides, and cover retention, teams and agent-driven tests.
Why a separate email address per program
Testers tend to keep accounts for a long time. A program with several roles needs a test user for each role, and a retest a month later needs the same accounts back. Putting each program behind its own address keeps that history together and keeps it apart from everything else.
- Nothing mixes. Mail for one program never lands beside another program’s, or beside your own mail.
- Findings are easier to write up. The reset email you triggered, with its headers and timing, is in a single inbox you can open when you draft the report.
- Tidy-up is one action. When a program closes, you delete its addresses instead of searching a shared inbox for old codes.
- The account is easy to explain. The address name and a private label say which program and which test user it belongs to.
If you already keep an address for every online sign-up, the idea will feel familiar: our guide to an email address for every sign-up describes the personal version, and which site shared my email address shows what a per-address trail tells you.
How this sits beside a bounty platform’s email alias
Bug bounty platforms look after their researchers with email aliases, and many programs ask testers to use one. HackerOne’s documentation says each hacker account has an alias generated from the username, in the form username@wearehackerone.com, that forwards to the address registered on the account, and that a + suffix can create several test accounts on one program (read on 27 November 2026 at docs.hackerone.com). Bugcrowd’s documentation describes a username@bugcrowdninja.com alias that forwards to your primary address and can be used to sign up for test accounts (read on 27 November 2026 at docs.bugcrowd.com).
Use the platform alias wherever a program’s brief asks for it, because it also helps the program recognise your traffic. Mailcycle works beside it:
- Use the alias the program requires for the account the brief names. Forward that mail wherever you read it.
- Use a Mailcycle address for each additional test account inside the program: the second role, the second tenant, the invited user. Each one is its own inbox, so a script can wait on one account’s mail without sifting through the others.
- Use a Mailcycle address for your own application’s test accounts, where no platform is involved.
Whichever address you use, the program’s rules come first. If a brief names the address or username to test with, test with that.
What you need
- A Mailcycle account. Open the web app or an iOS or Android app and choose Create an account. The account is a 12-word recovery phrase made on your device, with no sign-up form, phone number or password.
- A plan with the addresses you need. Personal has 25 addresses, and Scale has 1,000. The pricing page lists every plan.
- Node.js 20 or later and the SDK:
npm install mailcycle-sdk. The SDK is one of nine Mailcycle SDKs, all Apache-2.0. - Your recovery phrase in the environment, for example
MAILCYCLE_PHRASE. Mail is encrypted the moment it arrives, and the SDK opens it on your machine with keys made from the phrase. Keep it out of logs and out of the repository.
Step 1: Create an address for the program
A Mailcycle address takes your own prefix, and the server adds a short random ending so each name is free and distinct. A prefix such as acme-bounty tells you at a glance which program the address is for. The private label, sealed on your machine, can carry more detail, such as the role of the test user.
import { Mailcycle } from 'mailcycle-sdk';
const mc = await Mailcycle.signIn({ phrase: process.env.MAILCYCLE_PHRASE });
const tester = await mc.addresses.create({
prefix: 'acme-bounty',
label: 'Acme program, test user 1',
retentionDays: 7,
});
console.log('address for the program:', tester.emailAddress);
On a real run this printed an address like acme-bounty-0gud@birchpier.com. That is the address you type into the target’s sign-up form, and tester.id is what the script waits on. The other options you may want are localPart to choose the whole name on Scale and above, and domain to pick from the domains your plan can use, listed by mc.domains.list().
Step 2: Wait for the code in your script
Your target sends its mail when you submit the form, so take the time first, then call waitFor. The since option counts any mail that arrived from that moment on, even if it landed before the connection was up, so a quick sender cannot slip past.
const since = new Date();
// Submit the in-scope sign-up form here with tester.emailAddress.
const mail = await mc.messages.waitFor({
inboxId: tester.id,
since,
subject: 'verification',
timeoutMs: 60_000,
});
const code = mail.text.match(/\b\d{6}\b/)?.[0];
waitFor resolves with the opened message, with from, subject, text and html ready to use, and rejects with the error code timeout when nothing matching arrives in time. The from and subject filters keep an unrelated message, such as a welcome email, from ending the wait. For a link instead of a code, take the first URL on the target’s own host out of mail.text, and open it in the browser or client you are testing with.
Step 3: The whole script, run on a test account
To check the script without touching any outside service, the example below creates a second address that plays the target’s mailer, and sends one message between the two addresses. Sending needs the Personal plan or above. In real use your target sends the mail and the second address and the send call are not needed.
// program-inbox.mjs
import { Mailcycle } from 'mailcycle-sdk';
const mc = await Mailcycle.signIn({ phrase: process.env.MAILCYCLE_PHRASE });
const tester = await mc.addresses.create({ prefix: 'acme-bounty', label: 'Acme program, test user 1', retentionDays: 7 });
// Stands in for your own app's mailer, so the example needs nothing outside the account.
const app = await mc.addresses.create({ prefix: 'acme-app', label: 'Acme app mailer' });
console.log('address for the program:', tester.emailAddress);
try {
const since = new Date();
await mc.messages.send({
from: app.emailAddress,
to: tester.emailAddress,
fromName: 'Acme',
subject: 'Your Acme verification code',
text: 'Your verification code is 482913. It expires in 10 minutes.',
});
const mail = await mc.messages.waitFor({ inboxId: tester.id, since, subject: 'verification', timeoutMs: 60_000 });
const code = mail.text.match(/\b\d{6}\b/)?.[0];
console.log('from:', mail.from, '| subject:', mail.subject, '| code:', code);
} finally {
// The engagement is over: both addresses and their mail go.
await mc.addresses.delete(tester.id);
await mc.addresses.delete(app.id);
console.log('addresses deleted');
}
Run it with MAILCYCLE_PHRASE="..." node program-inbox.mjs. This is the output from the run on 27 November 2026:
address for the program: acme-bounty-0gud@birchpier.com
from: acme-app-5yi5@birchpier.com | subject: Your Acme verification code | code: 482913
addresses deleted
The finally block is the habit worth copying: whatever happens in the middle, the addresses are removed. For a longer engagement you would skip that block, keep the address, and delete it when the program closes.
Test the flows that send mail
Mail is the second channel of most account flows, and each one is worth a look in your own application and in a program that includes it in scope. A single address per test account lets you walk through them one by one.
Sign-up confirmation
Register the test account with the program’s address and read the confirmation. Useful things to check are whether the code or link expires when it should, whether a used code is refused the second time and whether the mail names the right account.
Password reset
Request a reset for the test account and read the link. A reset flow is a classic place to look at token length, expiry, single use and what happens to older tokens when you request a new one. Since each program has its own inbox, you can compare several reset mails side by side with no confusion about which belongs to which account.
Email MFA codes
When a service sends a one-time code by email at sign-in, the script above is the whole harness: wait for the message and match the code. Test code lifetime, retries and what the service does after a wrong guess, within the program’s rules on automated requests.
Invite links and workspace roles
Invite one test address to a workspace owned by another, in a tenant you control or an in-scope one. The invite lands in its own inbox, so you can accept it as a second role and compare what each role sees. This is where a separate address per test account pays off most.
Notification and change-of-email mail
Changing the email on an account, adding a device or enabling a feature often triggers a notice. Having the old and the new address as two separate inboxes lets you confirm that both receive what they should.
Short retention, and mail that clears itself
Test mail is useful for a few days and clutter after that. Each Mailcycle address keeps its mail for 7 days by default, and you can choose 1 to 90 days per address, so a long run of tests does not leave a heap of old codes and reset links. Set retentionDays when you create the address, or change it later with mc.addresses.update(id, { retentionDays: 30 }).
If a finding needs its evidence kept longer, save the headers and body into your notes as you go. After that the mail clears itself, and deleting an address removes its mail straight away. This pairs well with how you already handle test data: short-lived by design, gone when the work is done.
No phone number or sign-up form for your own account
A tester’s own account is a small thing to get right and a large thing to get wrong. Mailcycle has no sign-up form: your account is the 12-word phrase made on your device, and no email address, name, phone number or password is stored. That means the account you test from carries no personal contact details, and there is nothing to reset or recover by text message.
Mail is encrypted the moment it arrives, with keys from your phrase, and trackers are stripped. The security page and the encryption concept page describe how. If you are weighing private email for everyday use as well, see our Proton Mail alternative guide.
Personal for one researcher, Scale for teams that script it
Personal is $7 a month. It includes 25 addresses, several addresses per device, sending from your addresses and unlimited devices. For a single researcher moving from program to program, 25 addresses cover a good number of active engagements, and you delete addresses as programs close to free places for the next.
Scale is $19 a month. It includes 1,000 addresses, full API access, API keys and webhooks, AI agent inboxes and up to 10 of your own domains, and you can choose the whole name before the @. A team that scripts account flows through the API, runs them from a pipeline or runs an agent against an in-scope target gets the room and the tools for it. The pricing page and plans and limits have the full tables.
Multi-user teams start on the Fleet plan; the teams guide covers them.
Agent-driven tests over MCP
If an AI agent drives your testing of an in-scope target, it can use the same inbox through the Mailcycle MCP server. The server, mailcycle-mcp, runs on the agent’s machine and works with Claude Code, Cursor, Codex or any other MCP client. The tool for this job is wait_for_message: the agent starts the wait, your target sends its code, and the call returns the whole message, so the model can read the code or the link.
Each call waits up to 50 seconds and can be repeated, and subject_contains or from_contains narrow it to the right message. Only mail that arrives after the call starts counts, so the agent starts the wait first. AI agent inboxes are part of Scale, and the details are on the MCP page and in email MCP server. Keep the agent inside the scope of the engagement and read its output as you would any tester’s.
Running it from a test suite
When the account flow under test is your own application’s, the same calls fit inside a browser or API test. A fixture creates an address, the test submits the form and waits for the mail, and the fixture deletes the address afterwards. We walk through that in full, with fixtures, parallel runs and CI, in testing email verification in Playwright and in the Cypress guide at email verification in Cypress. The program-level habit in this guide sits above those: pick the address per program, and let the suite create short-lived ones beneath it.
Cleaning up when the engagement ends
A short routine closes an engagement neatly:
- List the addresses for the program with
mc.addresses.list()and pick the ones that start with its prefix. - Save any evidence you need from the mail into your report notes.
- Delete each address with
mc.addresses.delete(id). The address and its mail are removed, and the address is never issued again.
const all = await mc.addresses.list();
for (const address of all) {
if (address.emailAddress.startsWith('acme-bounty-')) await mc.addresses.delete(address.id);
}
Deleting an address frees its place under your plan straight away. Close the test accounts on the target’s side too where the program allows it.
Troubleshooting
timeoutfromwaitFor. Nothing matching arrived in time. Check the address you gave the target, loosen or remove thesubjectfilter, and raisetimeoutMs. Some services queue mail for a minute or more.- The wrong message ends the wait. Add a
fromfilter, or a more specificsubject, so a welcome email does not match before the code does. - An older message matches. Take
sinceimmediately before you submit the form, so only mail from that moment on counts. - The address limit is reached. Delete finished addresses, or move to a plan with more. Creating an address beyond the limit is refused with a message saying why.
- A service refuses the address. The program’s rules decide which address you test with. Use the platform alias or the address the brief names for that account.
Next steps
- Read testing email verification in Playwright for the fixture pattern.
- See the SDK guide for every call used here, and the event stream guide for how
waitForlistens. - Compare the plans on the pricing page, then create your account.
FAQ
Why use a separate email address for each bug bounty program?
Each program's test accounts, codes and reset links stay in their own inbox, so nothing mixes with your personal mail or with another engagement. When the program ends you delete the address and its mail goes with it.
Can a script read the verification code for a test account?
Yes. With the Mailcycle SDK, mc.messages.waitFor({ inboxId, since, subject }) resolves with the opened message, and you match the code in its text. An agent-driven test does the same with the wait_for_message tool over MCP.
How does this sit beside the email alias a bounty platform gives me?
Use the platform alias wherever a program asks for it. Mailcycle adds a separate address for each test account inside one program, with mail you can read from code and delete when you finish.
Which Mailcycle plan do I need for security testing?
Personal ($7 a month, 25 addresses) suits a single researcher working through programs one at a time. Scale ($19 a month, 1,000 addresses, the API and AI agent inboxes) suits teams that script account flows or run an agent.
Do I need a phone number or a sign-up form to open the account?
No. A Mailcycle account is a 12-word recovery phrase made on your device. There is no form, phone number or password to give.
How long is test mail kept?
7 days by default, and you can set 1 to 90 days per address. Old codes and reset links clear themselves, so a long run of tests does not pile up.
What can I test with these addresses?
Your own application's account flows, and in-scope program accounts: sign-up confirmation, password reset, email MFA codes, invite links and notification mail. Work only inside the scope you have permission for.
How do I clean up when an engagement ends?
Delete each address with mc.addresses.delete(id) or from the app. The address and its mail are removed, and the address is never issued again.
Can I name the addresses after the program?
Every plan can add your own prefix, like acme-bounty, and a private label such as the program and the test user. On Scale you can also choose the whole name before the @, and add your own domains.
Receive email in code
- AgentMail Alternative for AI Agent Inboxes (AgentMail alternative)
- CloudMailin Alternative: Inbound Email to Rails With an Address per API Call (CloudMailin alternative)
- Mailgun Inbound Routes Alternative: Route Mail by Address, Not Regex (Mailgun Routes alternative)
- Mailosaur Alternative for Email Testing and Test Inboxes (Mailosaur alternative)
- Mailparser and Parseur Alternative: Incoming Email as JSON on a Webhook (Mailparser and Parseur alternative)
- MailSlurp Alternative for Email Testing and Test Inboxes (MailSlurp alternative)
- Mailtrap Alternative for Email Testing and Test Inboxes (Mailtrap alternative)
- Postmark Inbound Alternative: Addresses by API, Signed Webhooks (Postmark inbound alternative)
- Resend Inbound Alternative: An Address per API Call, Signed Events (Resend inbound alternative)
- SendGrid Inbound Parse Alternative: Inbound Email by API Call (SendGrid Inbound Parse alternative)
- Testmail.app Alternative for Email Testing and Test Inboxes (Testmail.app alternative)
- Test Email Flows on Real Devices with Appium: Read Sign-Up Codes in Python (Appium)
- How to Give a Browser Use Agent an Email Address and Let It Read Its Own Verification Code (Browser Use sign-ups)
- How to Receive Email in C#: Read the Inbox, Save Attachments and Get New Mail Pushed (C# / .NET)
- How to Test Email Verification in Cypress: Receive Sign-Up Codes with cy.task (Cypress)
- Ethereal Email Alternative: Test Nodemailer Emails with an Address per Test (Ethereal Email alternative)
- Golang Receive Email: How to Receive and Read Email in Go (Go)
- How to Read Email in Java: Read the Inbox, Save Attachments and Receive Mail in Spring Boot (Java)
- How to Receive Email in PHP with an Email API: Read the Inbox, Save Attachments and Handle Webhooks (PHP / Laravel)
- How to Receive Email in Python: Read the Inbox, Save Attachments and Get New Mail Pushed (Python)
- Receive Email in Ruby and Rails: Read the Inbox, Save Attachments and Handle Webhooks (Ruby)
- How to Receive Email in Rust: Read the Inbox, Save Attachments and Handle Webhooks in Axum (Rust)
- Add Inbound Email to Your SaaS: Support Intake and Reply-by-Email (SaaS support)
- How to Verify Email in Selenium Tests: Read Sign-Up Codes with Python and pytest (Selenium)
- How to Handle Email Verification in a Stagehand Browser Agent: Create an Address, Wait for the Code, Delete It (Stagehand sign-ups)
- How to Receive Email in Swift: Read the Inbox, Save Attachments and Handle Vapor Webhooks (Swift)
- How to Automate Email Verification in Tests with Playwright: OTP Codes, Magic Links and Password Resets (Testing email verification)
- How to Receive Email in Node.js: Read the Inbox, Save Attachments and Handle Webhooks (TypeScript / Node.js)
- How to Receive Email with a Webhook: Inbound Email to Your HTTP Endpoint (Webhooks)