Check an email
check_emailChecks the newest matching email at the address (or email_id, from count_emails): SPF, DKIM and DMARC, links to localhost or plain http, where its sign-in, verify, reset or invite link goes (expect_host), whether that link goes back to the site the test started on (link_site: expect_site, or the address's site; a localhost link from a hosted site, another site, a preview instead of the published app or the other way, plain http, or Bubble's live app instead of version-test fail), whether it says when its sign-in code or link expires and when a coupon ends, a plain-text part, its size against Gmail's 102 KB limit, image-only emails, whether it fits a phone (fixed widths, alt text, tiny text), and, when asked, whether it contains given phrases (expect_text), is in a given language (expect_language) arrived soon enough after since (expect_within, such as 5m) and has the attachments expected (expect_attachment, such as .pdf). A marketing email also gets list_unsubscribe (a List-Unsubscribe header with an https address), one_click_unsubscribe (List-Unsubscribe-Post, covered by a DKIM signature that verified), unsubscribe_link (one in the email), preheader (preview text) and after_unsubscribe (it came after the address unsubscribed from its sender, see mark_unsubscribed); other emails skip them. A coupon also gets offer_reuse: it fails when the sender already sent a coupon to another version of the address (name+promo1@…, capitals); and coupon_result, once record_coupon_result has said what checkout did with it. Marketing email is also judged by the rules where the persona lives (see record_consent): marketing_consent, prechecked_consent, double_opt_in, unsubscribe_deadline, postal_address, sender_identity, minor_marketing, misleading_subject (a fake Re: or a deadline the email contradicts) and ad_label (Singapore's ). Every email also gets harmful_attachment (a file type Gmail blocks, such as .exe or a program named like a .pdf, fails; macros, HTML pages and archives warn) and spam_risk, an inbox score out of 10 where 10 is good (inbox_score, with the markers that each take points off it; score, the spam points, is deprecated) of whether inboxes would reject it or file it as spam (5 or below fails), might (8.5 or below warns) or wouldn't (pass). Each check passes, fails, warns or is skipped, with a one-line reason. Verdicts only: never the email's text or links. Wait for the email first. The marketing and coupon checks need the project to test Offers or Marketing, and harmful_attachment and spam_risk need the project's spam checks on (update_project, or Project settings → What you test); checks of a feature the project has off are left out.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"address": "<address>"
},
"name": "check_email"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test | No | With run_id: the test or step this call belongs to, shown beside what it saw in the report. | |
| type | No | Only emails with a code, or with a link. | |
| since | No | Only email received at or after this time, such as when the test submitted the form. | |
| run_id | No | A run from start_run: what this call sees is added to its report. | |
| address | Yes | A test address in this project. A variant works too (capitals, or a +tag such as name+o'brien@…): it acts on the plain address, and a wait on a +tag variant only finds mail sent to it. | |
| service | No | Only email from this sender, by service name or domain. | |
| subtype | No | With type, comma-separated: otp or coupon for codes; verify, magic_signin, invite, reset, other, unsubscribe or list_unsubscribe for links; or any (for links, the sign-in kinds and other). | |
| category | No | Only sign-in emails (auth), receipts and notices (transactional), or offers and newsletters (marketing). For "an unsubscribed user gets no marketing", use marketing: receipts should still arrive. | |
| email_id | No | The email to check, as count_emails gives it. Default: the newest that matches. | |
| expect_host | No | The site its links should go to, such as staging.example.com (subdomains count). Without it, that check is skipped. Links to a host marked with mark_dev_host pass the local-links check. | |
| expect_site | No | The site the test started on, such as staging.example.com, localhost:3000 or myapp.bubbleapps.io/version-test. Default: the site the address was created with. link_site compares the email's verify, sign-in or reset link with it. | |
| expect_text | No | Phrases the subject or body should contain, such as the user's first name. Case, curly quotes and spacing don't matter. The answer names only the missing ones. | |
| expect_within | No | With since: how soon after it the email should arrive, such as 90s, 5m or 2h (arrival_time). For example, a coupon after signing up for an offer. | |
| expect_language | No | The language it should be in, such as de or pt-BR. | |
| expect_attachment | No | Attachments it should have: a type (application/pdf, image/*), an extension (.ics) or a file name with * (invoice-*.pdf). The answer names only the missing patterns. |