imap library

Anything you need to fetch and process messages using the IMAP protocol.

Use the ImapClient to connect to any IMAP compliant service.

Classes

AttachmentInfo
Information about a file that is attached
BinaryMimeData
Represents binary mime data
BodyPart
A BODY or BODYSTRUCTURE information element
Capability
Describes a capability
ContentDispositionHeader
Specifies the content disposition header of a mime part. Compare https://tools.ietf.org/html/rfc2183 for details.
ContentInfo
Provides high level information about content parts.
ContentTypeHeader
Eases reading content-type header values
Envelope
Contains the envelope information about a message.
FetchImapResult
Result for FETCH operations
GenericImapResult
A generic result that provide details about the success or failure of the command.
Encapsulates a MIME header
Id
Contains classes to support RFC 2971
ImapClient
Low-level IMAP library.
ImapConnectionLostEvent
Notifies about a connection lost
ImapEvent
Base class for any event that can be fired by the IMAP client at any time. Compare ImapClient.eventBus
ImapExpungeEvent
Notifies about a message that has been deleted
ImapFetchEvent
Notifies about a message that has changed its status / flags
ImapMessagesExistEvent
Notifies about new messages
ImapMessagesRecentEvent
Notifies about new messages
ImapServerInfo
Keeps information about the remote IMAP server
ImapVanishedEvent
Notifies about a sequence of messages that have been deleted. This event can only be triggered if the server is QRESYNC compliant and after the client has enabled QRESYNC.
ImapWarning
Warnings can often be ignored but provide more insights in case of problems They are given in untagged responses of the server.
MailAddress
An email address can consist of separate fields
Mailbox
Stores meta data about a folder aka Mailbox
MailConventions
Contains various mail specific conventions
MediaType
Describes the media type of a MIME message part
MessageBuilder
Simplifies creating mime messages for sending or storing.
MessageFlags
Contains common message flags
MessageSequence
Defines a list of message IDs.
MetaDataEntries
Contains meta data entries
MetaDataEntry
A meta data element
MimeData
Abstracts textual or binary mime data
MimeMessage
A MIME message
MimePart
A MIME part In a simple case a MIME message only has one MIME part.
MimeThread
Abstract a mime message thread
PagedMessageSequence
A paginated list of message IDs
ParameterizedHeader
A parameter that may contain additional parameters
PartBuilder
Allows to configure a mime part
QResyncParameters
Classes for implementing QRESYNC https://tools.ietf.org/html/rfc7162 QRESYNC parameters when doing a SELECT or EXAMINE.
QuotaResult
Result for QUOTA operations
QuotaRootResult
Result for QUOTAROOT operations
ResourceLimit
QUOTA resource limit
Response<T>
Base class for command responses.
ReturnOption
Return option definition for extended commands.
SearchImapResult
Result for SEARCH and UID SEARCH operations
SearchQueryBuilder
Creates a new search query.
SearchTerm
Base class for all search terms
SearchTermAll
Searches all messages
SearchTermAnswered
Searches for answered/replied messages
SearchTermBcc
Searches for messages with a BCC recipient that matches
SearchTermBefore
Searches for messages stored before the given date.
SearchTermBody
Searches in the body of messages. This is usually a long lasting operation.
SearchTermCc
Searches for messages with a matching recipient on CC
SearchTermCharsetUf8
Set the charset to UTF8
SearchTermDeleted
Searches for deleted messages
SearchTermDraft
Searches for draft messages
SearchTermFlagged
Searches for flagged messages
SearchTermFrom
Searches for messages where the sender matches the senderPart
SearchTermHeader
Searches for messages with the given header
SearchTermKeyword
Searches for messages flagged with the given keyword
SearchTermLarger
Searches for messages that are bigger than the given size
SearchTermNew
Searches for new messages
SearchTermNot
Negates the given search term
SearchTermOld
Searches for old messages
SearchTermOn
Searches for message stored at the given day
SearchTermOr
Combines two atomic search terms in an OR way Note that you cannot nest an OR term into another OR term
SearchTermRecent
Searches for recent messages
SearchTermSeen
Searches for seen / read messages
SearchTermSentBefore
Searches for messages sent before the given date
SearchTermSentOn
Searches for message sent at the given day
SearchTermSentSince
Searches message sent after the given time
SearchTermSince
Searches for messages stored after the given time
SearchTermSmaller
Searches messages with a size less than given
SearchTermSubject
Searches for messages with a matching subject
SearchTermText
Searches any text header
SearchTermTo
Searches for recipients
SearchTermUnanswered
Searches messages without the replied flag
SearchTermUndeleted
Searches messages that are not deleted
SearchTermUndraft
Searches for messages that carry no draft flag
SearchTermUnflagged
Search for not flagged messages
SearchTermUnkeyword
Searches for messages without the keyword
SearchTermUnseen
Searches for unseen messages
SequenceNode
A message sequence to handle nested IDs like in the IMAP THREAD extension.
SortImapResult
Result for SORT and UID SORT operations
StoreImapResult
Result for STORE and UID STORE operations
TextMimeData
Represents textual mime data
UidResponseCode
Contains a UID response code
UidSearchTerm
Searches for the given UID messages

Enums

CharacterSet
The used character set
ContentDisposition
Specifies the content disposition of a mime part. Compare https://tools.ietf.org/html/rfc2183 for details.
ImapEventType
Classification of IMAP events
MailboxFlag
Contains common flags for mailboxes
MediaSubtype
Detailed media types Compare https://www.iana.org/assignments/media-types/media-types.xhtml
MediaToptype
Top level media types
MetaDataDepth
The depth of a meta data request
RecipientGroup
The recipient
ResponseStatus
Status for command responses.
SearchMessageType
Defines what kind of messages should be searched
SearchQueryType
Which part of the message should be searched
SelectionOptions
LIST-EXTENDED selection options
SequenceNodeSelectionMode
Selection mode for retrieving a MessageSequence from a nested SequenceNode structure.
StatusFlags
Options for querying status updates
StoreAction
Possible flag store actions
TransferEncoding
The transfer-encoding used for encoding 8bit data if necessary

Extensions

MediaSubtypeExtension on MediaSubtype
Extension on MediaSubtype
SequenceExtension on List<MimeMessage>
Allows to get a sequence for a list of MimeMessages easily
Stringify on SelectionOptions
Extension on SelectionOptions

Exceptions / Errors

BaseMailException
Base exception for any IMAP, POP, SMTP or highlevel API exceptions
ImapException
Provides information about an exception
InvalidArgumentException
Notifies about an invalid argument