What is IMAP?
Internet Message Access Protocol
IMAP (Internet Message Access Protocol) is the protocol an email client uses to read and manage messages that stay stored on the mail server. Because the mail lives on the server, every device you connect — phone, laptop, webmail — sees the same inbox, folders, and read/unread state.
How IMAP works
An IMAP client connects (typically on port 993) and syncs with the server: it fetches message headers and bodies on demand, mirrors the folder structure, and keeps flags like “read” or “flagged” in sync. Messages remain on the server until you delete them.
IMAP vs. POP3
IMAP is the modern default for reading email because it keeps everything consistent across devices. Its older sibling, POP3, downloads mail to one device and usually deletes it from the server. Sending is handled separately by SMTP. For automated testing you usually skip IMAP entirely and read messages over a REST API instead — far simpler than scripting an IMAP client. See receiving email with an API.
Test email the easy way
Devmailr gives you disposable @devmailr.app inboxes over an API — read verification codes, links, and SPF/DKIM/DMARC verdicts in your tests. Free plan, no card.
Get a free inbox