IMAP & SMTP
AgentMail supports standard IMAP and SMTP protocols, allowing you to connect using traditional email clients or integrate with existing systems that rely on these protocols.
What are IMAP and SMTP?
IMAP (Internet Message Access Protocol) and SMTP (Simple Mail Transfer Protocol) are the standard protocols that power email communication across the internet.
-
IMAP is used to read and manage emails. It allows email clients to sync with a mail server, keeping your messages organized across multiple devices. When you check your inbox in Outlook or Thunderbird, you’re using IMAP.
-
SMTP is used to send emails. When you hit “Send” on an email, SMTP handles delivering that message to the recipient’s mail server.
Why Use IMAP/SMTP with AgentMail?
- Email Client Integration: Connect Outlook, Thunderbird, Apple Mail, or any IMAP/SMTP-compatible client to your AgentMail inbox
- Programmatic Access: Send and receive emails using standard libraries (like Python’s
imapliborsmtplib) in any programming language - Legacy System Integration: Bridge AgentMail with existing systems that only support IMAP/SMTP protocols
- Familiar Tooling: Use email tools you already know during development and testing
Finding Your Credentials
Before configuring IMAP or SMTP, you’ll need two pieces of information from the AgentMail Console:
IMAP Configuration
Use IMAP to read emails from your AgentMail inbox.
SSL/TLS Required
SSL/TLS is required for all IMAP connections. Connections without SSL will be rejected. Make sure to enable SSL/TLS in your email client settings.
Folder Support
Currently, only the INBOX folder is accessible via IMAP. Other folders (Sent, Drafts, Trash) are not available through IMAP. Use the AgentMail API for full folder access.
Python IMAP Example
TypeScript IMAP Example
SMTP Configuration
Use SMTP to send emails from your AgentMail inbox.
SSL/TLS Required
SSL/TLS is required for all SMTP connections. Connections without SSL will be rejected. Make sure to enable SSL/TLS in your email client settings.
From Address
The “From” address in your email should match the email address of your inbox
(e.g., myinbox@agentmail.to). Using a different From address may result in
delivery failures.
SMTP Limits
- Max recipients: 50 per email
- Max message size: 10MB
- Session timeout: 30 minutes
