Ask AI to Test Your Email
The usual way to test email flows is a stack of configuration: a sandbox SMTP account, a test inbox, credentials in a .env, a script that polls for the message. The MCP integration flips that around — you describe the outcome in a sentence, and the AI agent does the setup, the sending, the waiting and the verification for you, inside a disposable Tempx inbox.
One pairing, then everything by prompt
Pair your agent once — from the account page or the one-command Claude pairing — and grant the connection the send permission if you want the agent to compose test mail. From that moment the agent carries a scoped toolbox: it can create SMTP credentials, watch and read the inbox, and send captured messages. It never sees any other mailbox, everything it sends is captured (never delivered), and you can revoke the connection in one click.
“Set up my SMTP testing”
Instead of hunting through a dashboard, just ask:
Create an SMTP test credential for this inbox and give me a Laravel .env snippet.
The agent calls create_smtp_credential, which mints a fresh tmtp_… username and password (shown once, exactly like the account page) bound to the paired inbox. It hands you back the snippet:
MAIL_MAILER=smtp MAIL_HOST=smtp.tempx.uk MAIL_PORT=587 MAIL_USERNAME=tmtp_x9f3… YOUR_USERNAME MAIL_PASSWORD=YOUR_PASSWORD MAIL_ENCRYPTION=tls
Point your app at it and every outgoing message — welcome mails, receipts, password resets — is captured in the agent's inbox instead of reaching a real human. Regenerating later invalidates the old password instantly.
“Check the inbox”
Reading is the agent's home turf. Prompts that work well:
Check the inbox — list the latest five emails with sender, subject and time.
Find the verification email from noreply@saas.test and read me the code.
Under the hood that is list_emails, search_emails and get_email; the long-polling wait_for_email makes the agent efficient — it waits server-side and reacts the second a matching message lands, instead of polling in a loop.
“Send a test email and verify it”
This is where automation gets fun. One prompt runs the whole send-and-verify cycle:
Send a test welcome email to agi@example.com and qa@example.com (subject “Welcome aboard”), wait for it to appear in the inbox, then confirm the sign-up link and the recipient list are correct.
The agent composes with send_email (up to 10 recipients, any domain), the message is captured — Mailtrap-style, never delivered — and the agent reads the captured copy back with get_email to check the subject, body and recipients before telling you it passed.
Where this fits
- Developers: keep the app on the SMTP credential and let the agent own the assertions — it reads the captured copy so your test suite doesn't need a parser.
- QA: run signup, reset and notification scenarios conversationally before automating them into CI.
- Anyone: “sign up on this site with my tempx inbox, wait for the code, and tell me what it is” is a complete workflow in one sentence.
Staying safe while automating
- Sending is capture-only by design — an agent cannot email a real person even if a prompt asks it to.
- The token is scoped to one inbox; leaking it exposes a disposable mailbox, nothing else.
- Give the connection the
sendpermission only when you actually compose mail, keep expiries short, and revoke when the work is done. - As always: never move an account you want to keep onto a disposable address.
Related: Testing email with SMTP and MCP · Give Claude an inbox · Give your email to your AI agent
Pair an agent in under a minute
One connection, one inbox, full email-testing automation by prompt.
Connect an agent Try the inbox