Version: 2.9.4.1
Use controls to create, send, retrieve, preview and edit Internet email messages.

Imap ActiveX Control

The Imap control is used to download and manage email messages on IMAP4 servers. A local object model (mailboxes and messages are represented as objects) makes remote mail management easy, with no knowledge of IMAP4 commands required! Features include:

  • Intuitive object-based interface makes coding easy!
  • A collection of Mailbox objects represents each mailbox on the server.
  • Each Mailbox object has a collection of Message objects representing each message in the mailbox.
  • The Message object provides an object representation of any e-mail message. This formatting object supports easy manipulation of simple and complex (even nested) MIME messages.
  • Progress and State events enable easy user notification of message retrieval.
  • IDLE is supported.
  • Detailed knowledge of IMAP4 is not required.
  • Comes complete with extensive sample projects.

Looking for the .NET version of this control?

Development Environments

  • Visual Studio .NET (.NET Framework)
  • Visual Basic (VB)
  • Visual C++ (VC++)
  • FoxPro
  • PowerBuilder
  • Delphi
  • C++ Builder
  • ASP
  • Office 97/2000

Interface

Public Properties
AutoClose Specifies whether to close a Mailbox when done with it.
AttachmentDirectory Decoded message attachments are created in this directory.
AttachmentOverwrite Specifies whether decoded message attachments are overwritten if the filename is the same.
Capabilities Collection of strings that contains the protocol extensions supported by the server. Values are initialized during login.
EnableNonAscii Enables the usage of Non-ASCII characters in the username.
Mailboxes Collection of Mailbox Objects.
State Provides status information to the user interface. The State event fires to signal that this property has changed
Timeout Controls the blocking behavior of methods that can be used in blocking and non-blocking ways.
Public Methods
Abort Abort any blocking method and release all system resources.
About Show the About Box.
Command Send any command to the server.
Login Connect to a server and authenticate in one step.
Logout Gracefully end a session.
Refresh Get a listing of mailboxes.
Trace Start or stop the accumulation of trace or debug data. Once started, this method accumulates data until it is turned off.
Public Events
Alert Fires when an alert message is received from the server.
Error Fires when an error condition occurs.
Progress Fires when a method has completed, the server has sent a reply, or progress information is available.
State Fires when the State property changes.

Code Example

How easy is the IMAP Control to use? Check out the VB example below which demonstrates how to login and get all messages in a mailbox.

' Login to the IMAP server
Imap1.Login "imap.test.com", "user", "pass"

' Get all mailboxes
Imap1.Refresh

' Imap1.Mailboxes("INBOX").Count now contains the number of messages in the INBOX
' Get messages and put them into the map1.Mailboxes("INBOX").Messages
' collection
Imap1.Mailboxes("INBOX").Get

' Display the number of messages
MsgBox Imap1.Mailboxes("INBOX").Count