Testing user registration flows manually is slow and error-prone. Modern QA teams use automated APIs to generate infinite test accounts and verify emails programmatically.
Why Use an Email API?
If you are building a signup form, you need to verify that your transactional emails (Welcome, Verify Email, Forgot Password) are actually arriving.
Mocking verification works locally, but it doesn't test your email delivery provider (SendGrid, AWS SES). Using a real email API like TMailBox confirms end-to-end delivery.
Basic Usage
Our API is RESTful and easy to integrate with Cypress, Selenium, or Playwright.
1. Generate a Session
GET https://api.tmailbox.in/api/v1/session/new
Response:
{
"email": "[email protected]",
"sessionId": "abc-123-xyz"
}
2. Check Messages
GET https://api.tmailbox.in/api/v1/messages?sessionId=abc-123-xyz
This returns a JSON array of all emails received by that temporary address.
Integration with Cypress
Here is a quick snippet to use TMailBox in your E2E tests:
cy.request('https://api.tmailbox.in/api/v1/session/new').then((response) => {
const email = response.body.email;
cy.get('input[name="email"]').type(email);
cy.get('button[type="submit"]').click();
});