The email infrastructure
for autonomous email verification.
Developers building verification agents need primitives to send confirmation emails, read responses, and track which addresses are valid and active. Mailgent provides the email API so your agent can verify addresses, confirm signups, and clean contact lists programmatically.
API Primitives used
mail.sendSend verification emails
Deliver confirmation emails with unique verification tokens or reply-to-confirm instructions to addresses that need validation.
mail.list_messagesCheck for confirmations
Monitor for reply-based confirmations, bounce notifications, and auto-responses to determine address validity and inbox activity.
mail.get_threadRead verification responses
Load the full message to parse confirmation tokens, extract bounce reason codes, or identify auto-reply patterns.
mail.update_labelsTrack verification status
Label addresses as verified, bounced, or unresponsive. Maintain a clean, organized verification pipeline.
Bad email addresses cost you deliverability and reputation.
Every unverified address on your list is a risk — hard bounces damage your sender reputation, spam traps get you blocklisted, and invalid contacts waste your sending budget. Most teams verify addresses once at signup and never again, even as employees change jobs and mailboxes go stale over time.
Developers building verification agents need email primitives that send confirmation messages, detect bounces, and track results. Mailgent provides mail.send for verification emails, mail.list_messages to detect responses and bounces, and mail.update_labels to track status.
How to build it.
mail.sendSend verification emails
Your agent sends confirmation emails to each address using mail.send, including a unique token or reply instruction. Each batch goes from a dedicated verification identity.
mail.list_messagesProcess responses
The agent monitors for replies and bounces using mail.list_messages. It reads each response with mail.get_thread to distinguish confirmations from bounces and auto-replies.
mail.update_labelsUpdate verification status
The agent labels each address as verified, bounced, or unresponsive using mail.update_labels. Bounced addresses are flagged for removal from your active list.
Example prompt
“Send verification emails to the 500 new signups from this week. After 48 hours, mark anyone who confirmed as 'verified', bounced addresses as 'invalid', and non-responders as 'pending-retry'.”
What developers build.
Signup confirmation
Build agents that send double opt-in emails to new signups, verify their address, and only activate accounts after confirmation.
List hygiene
Build agents that periodically re-verify your entire contact list, removing bounced addresses, flagging unresponsive contacts, and keeping your sender reputation clean.
Lead validation
Build agents that verify email addresses submitted through lead forms before passing them to sales. Filter out fake, disposable, and mistyped addresses early.
Deliverability monitoring
Build agents that send test emails to seed addresses across major providers, track delivery rates, and alert your team when deliverability scores drop below threshold.
Why not use an email verification API?
Verification APIs check syntax and MX records, but they cannot confirm that a real person reads the inbox. The only way to truly verify an address is to send an email and see if someone responds or if the message bounces. Syntax checks miss catch-all domains, role addresses, and abandoned mailboxes entirely.
Mailgent gives you the primitives for real verification. mail.send delivers the confirmation, mail.list_messages detects the response, and mail.update_labels tracks the result. Your agent verifies addresses the way humans do — by actually emailing them.
Isolated sending identity
Verification emails go from a dedicated identity. Your primary domain reputation is never at risk.
Rate-controlled sending
Send at controlled rates to avoid triggering spam filters. Your agent respects provider limits.
Bounce tracking
Every send, bounce, and confirmation is logged. Full visibility into your verification pipeline.