EsPop - ActiveX Control

Eurosource, Gruvbyn 415, S-820 50 LOOS, Sweden
( (

Updated: 1999-05-05 21:47

This control encapsulates the POP3 protocol and compile with MIME version 1.0. This means that it can be used to receive binary information as well as mail bodies containing characters like the Swedish . You can use this control to fetch mail from a POP server on a UNIX machine or like. There is no restriction on message sizes. The control also have methods that lets you extract attachments.


Transfer EsPop32.ocx to your \windows\system or \winnt35\system32 directory and register it by executing the command:

RegSvr32 \Windows\System\ESPOP32.OCX

RegSvr32.exe can be found on the Visual Basic 4.0 CD-ROM and in our dll archive ( If RegSvr32.exe fails, it's probably because you don't have the MFC 4.0 DLL library installed on your system. This is available from many sources on the Internet including our ftp archive as MFCDLLS.ZIP. Regsvr32.exe is also included in this archive. If you want to check if you already got the files in they are

  • mfc42.dll
  • msvcrt40.dll
  • oc30.dll
  • olepro32.dll
  • regsvr32.exe


New features in version 1.1

  1. EsPop can now be used in ASP-applications ( Server side scripting ).
  2. A new property POPServer is added that resolves internet names and that can be used with both names and IP-addresses.
  3. A Port property is added which gives the possibility to use non standard ports.
  4. All error return codes has been changed. (sorry!!! :-(  )
  5. A response event has been added which makes it possible to inspect replies sent from the server.
  6. The Top command is no implemented. The command retrives only the first lines of a message.
  7. A number of proporties have been added that scans common fields in the header. The New proporties are Subject, Date, From, To and ReturnPath
  8. A new property Header is added which extracts the header from the message.
  9. A new method MoveTempFile has been added which moves the received message temp file to another location on the users disk.
  10. A new method MessageToMailBody has been added that copies the body of a message to a new location.
  11. Funtions for extracting Mime messages (attachments are added).



Cookbook or how to use the EsPop Control


Create a EsPop object for an ASP application

Use the object ID ESPOP.EsPopCtrl.1 when you create an instance of the EsFtpCtrl.

So the code

<object RUNAT="server" PROGID="ESPOP.EsPopCtrl.1" id="EsPOP"> </object>
set EsPOP = server.CreateObject("EsPOP.EsPOPCtrl.1")

will create the object for you.

Connect to a POP server

The first property you should set is the POPServer using

EsPop1.POPServer =""

Of course you have to use the IP-address if your own POP server. This property is saved with the control so you can also set it on once and for all in the property window.

The next thing you should do is to set the username and password to use for your POP session. You do this by

EsPop1.Username ="Smith"
EsPop1.Password ="Secret"

Of course you have to use your own username and password. The Username but not the password is saved with the control and can, if you want, be set once and for all in the property window.

To connect to the POP server you need to have a link open to the POP server. Either through your LAN or by a RAS connection or some other dialup method. Our control EsRas is the perfect control to use if you want to establish a connection, fetch mail and then drop this connection.

To establish a connection with the POP server you just have to logon using something like the following

rv = EsPop1.Logon
if ( rv = False ) then
   ' there was an error the property EsPop1.ErrorNo contains the
    ' error code for the error


While you are logged on you can fetch, delete and do all other operations that are available for mail on the server. When you have done your work on the server you use the LogOff method to terminate your POP session.


Disconnect from a POP server

You always have to logoff before you terminate a session with a POP server. Some systems even don't want to let you connect to the server again (until the POP server is restarted) if you don't do this. So please logoff before your terminate your POP session. This is done with the LogOff method

rv = EsPop1.LogOff
if ( rv = False ) then
    ' there was an error the property EsPop1.ErrorNo contains the
    ' error code for the error



Get information about available mail on the server

When you are logged on to the POP server the NumOfMsg property contains the number of messages that is available on the server. The total size in bytes for all of these messages is available in the TotMsgSize property.

Number_Of_Messages = EsPop1.NumOfMsg
Total_Size = EsPop1.TotMsgSize

Get a specific message from the server

You use the GetMail method to retrieve a message from the POP server. The argument you give to this function should be the message number you want to get. The first message is numbered one (NOT zero) and the last message has the same index as the value in the NumOfMsg property.

MessagePath is another property that is important for message retrieval. Retrieved messages are always put in a temporary file. This file is defined by the MessagePath property. If you call GetMail without specifying a path a file is created for you in the windows temporary file directory and you can check this property after a successful message fetch to get the location and name of the file. If you want you can also set this property to a value before you call the MessagePath method. In this case the fetched message is stored at the end of that file and with a blank line separating multiple messages. Normal sized messages, that is with a size less than 32768, are also stored in there raw form in the Message property.

By using a file for message storage there is no upper limit to the size of the messages that you can fetch. This means that there is no problem to get messages that contain large file attachments. There is one problem though if you receive small messages and only use the message property to work with messages because you always also get the temporary file. There is two ways around this problem.

  1. Use the DeleteTempFile method after using GetMail to delete the temporary file. The index used for DeleteTempFile should be the same as you used in the GetMail call.
  2. Set the MessagePath property to a valid filename/path when you start your mail session. Leave this file as a backup or delete it after each mail session.

The following sample get message 3 from a POP server, deletes it and displays the message in a message box. This is only done for if it is a small message.

nMsgNo = 3
if ( EsPop1.GetMessageSize(nMsgNo) < 32768 ) then
    if ( EsPop1.GetMail(nMsgNo) ) then
         ' Delete the temporary file
       ' Delete the message at the server
       ' Display message
        msgbox EsPop1.Message
        ' Here we have an error ErrorNo contains the error code

Note that there is no need to delete the messages on the server. If you don't do this the message will be available on the server the next time you connect. Also if you delete messages and then call the Reset method the message delete is canceled.


Using the status event

During lengthy operations the status event is a useful tool to inform your user about the progress of the work. If for instance you are downloading a large letter consisting of several big attachments you need a way to inform your customers of the state of things. The status event is your tool to do this.

At a start of a message download a status event with progress set to 0 is generated. You can directly feed this value to the gauge of your choice. Then during the message download you get status events with progress set to a number that represents the percentage of work done. And finally when all of the message is received a status event with progress set to 100 will be fired. Telling you or the user that all of the work with this message has been done.

The event procedure thus normally have this simple form

Private Sub EsPop1_Status(ByVal progress As Integer)
    ProgressBar1.Value = progress
End Sub





POPServerIP ( Replaced by POPServer, DO NOT USE!!! )



BOOL bMimeMessage

Read only.

This property is set to true if the received message is a MIME 1.0 message.



String Boundary

Read only.

If the received message is a MIME 1.0 message this property contains the boundary for the message.



String ContentType

Read only.

If the received message is a MIME 1.0 message this property contains the Content type for the message. See the content event for information on possible values.



String Date

Read only.

After a message has been retrived with either the GetMessage or the GetTop commands this property holds the date line from the header.



short ErrorNo

Read only.

The error code from the last operation.

There are two types of error messages. One type is the POP3 reply codes and one is the WinSock error codes.

POP3 reply codes

-1  ERROR_POP_GENERAL General Error.
-2  ERROR_POP_CONNECT  Error when connecting to server.
-3 ERROR_POP_USER The server did not accept the user.
-4  ERROR_POP_PASSWORD The server did not accept the password.
-5 ERROR_POP_QUIT The server did not accept the quit-session command.
-6 ERROR_POP_STAT The server did not accept the status command.
-7 ERROR_POP_LIST The server did not accept the list-command.
-8 ERROR_POP_DELETE The server did not accept the delete-command.
-9 ERROR_POP_RETR The server did not accept the retrive-command.
-10  ERROR_POP_TOP The server did not accept the top-command.


WinSock error codes

10013 - WSAEACCES, Permission denied.
An attempt was made to access a socket in a way forbidden by its access permissions. An example is using a broadcast address for sendto without broadcast permission being set using setsockopt(SO_BROADCAST).

10048 - WSAEADDRINUSE, Address already in use.
Only one usage of each socket address (protocol/IP address/port) is normally permitted. This error occurs if an application attempts to bind a socket to an IP address/port that has already been used for an existing socket, or a socket that wasn't closed properly, or one that is still in the process of closing. For server applications that need to bind multiple sockets to the same port number, consider using setsockopt(SO_REUSEADDR). Client applications usually need not call bind at all - connect will choose an unused port automatically.

10049 - WSAEADDRNOTAVAIL, Cannot assign requested address.
The requested address is not valid in its context. Normally results from an attempt to bind to an address that is not valid for the local machine, or connect/sendto an address or port that is not valid for a remote machine (e.g. port 0).

10047 - WSAEAFNOSUPPORT, Address family not supported by protocol family.
An address incompatible with the requested protocol was used. All sockets are created with an associated "address family" (i.e. AF_INET for Internet Protocols) and a generic protocol type (i.e. SOCK_STREAM). This error will be returned if an incorrect protocol is explicitly requested in the socket call, or if an address of the wrong family is used for a socket, e.g. in sendto.

10037 - WSAEALREADY, Operation already in progress.
An operation was attempted on a non-blocking socket that already had an operation in progress - i.e. calling connect a second time on a non-blocking socket that is already connecting, or canceling an asynchronous request (WSAAsyncGetXbyY) that has already been canceled or completed.

10053 - WSAECONNABORTED, Software caused connection abort. 
An established connection was aborted by the software in your host machine, possibly due to a data transmission timeout or protocol error.

10061 - WSAECONNREFUSED, Connection refused.
No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host - i.e. one with no server application running.

10054 - WSAECONNRESET, Connection reset by peer.
A existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, or the remote host used a "hard close" (see setsockopt for more information on the SO_LINGER option on the remote socket.)

10039 - WSAEDESTADDRREQ, Destination address required.
A required address was omitted from an operation on a socket. For example, this error will be returned if sendto is called with the remote address of ADDR_ANY.

10014 - WSAEFAULT, Bad address.
The system detected an invalid pointer address in attempting to use a pointer argument of a call. This error occurs if an application passes an invalid pointer value, or if the length of the buffer is too small. For instance, if the length of an argument which is a struct sockaddr is smaller than sizeof(struct sockaddr).

10064 - WSAEHOSTDOWN, Host is down.
A socket operation failed because the destination host was down. A socket operation encountered a dead host. Networking activity on the local host has not been initiated. These conditions are more likely to be indicated by the error WSAETIMEDOUT.

10065 - WSAEHOSTUNREACH, No route to host.
A socket operation was attempted to an unreachable host. See WSAENETUNREACH

10036 - WSAEINPROGRESS, Operation now in progress.
A blocking operation is currently executing. Windows Sockets only allows a single blocking operation to be outstanding per task (or thread), and if any other function call is made (whether or not it references that or any other socket) the function fails with the WSAEINPROGRESS error.

10004 - WSAEINTR, Interrupted function call.
A blocking operation was interrupted by a call to WSACancelBlockingCall.

10022 - WSAEINVAL, Invalid argument.
Some invalid argument was supplied (for example, specifying an invalid level to the setsockopt function). In some instances, it also refers to the current state of the socket - for instance, calling accept on a socket that is not listening.

10056 - WSAEISCONN, Socket is already connected.
A connect request was made on an already connected socket. Some implementations also return this error if sendto is called on a connected SOCK_DGRAM socket (For SOCK_STREAM sockets, the to parameter in sendto is ignored), although other implementations treat this as a legal occurrence.

10024 - WSAEMFILE, Too many open files.
Too many open sockets. Each implementation may have a maximum number of socket handles available, either globally, per process or per thread.

10040 - WSAEMSGSIZE, Message too long.
A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.

10050 - WSAENETDOWN, Network is down. 
A socket operation encountered a dead network. This could indicate a serious failure of the network system (i.e. the protocol stack that the WinSock DLL runs over), the network interface, or the local network itself.

10052 - WSAENETRESET, Network dropped connection on reset.
The host you were connected to crashed and rebooted. May also be returned by setsockopt if an attempt is made to set SO_KEEPALIVE on a connection that has already failed.

10051 - WSAENETUNREACH, Network is unreachable. 
A socket operation was attempted to an unreachable network. This usually means the local software knows no route to reach the remote host.

10055 - WSAENOBUFS, No buffer space available.
An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

10042 - WSAENOPROTOOPT, Bad protocol option.
An unknown, invalid or unsupported option or level was specified in a getsockopt or setsockopt call.

10057 - WSAENOTCONN, Socket is not connected.
A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using sendto) no address was supplied. Any other type of operation might also return this error - for example, setsockopt setting SO_KEEPALIVE if the connection has been reset.

10038 - WSAENOTSOCK, Socket operation on non-socket.
An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid.

10045 - WSAEOPNOTSUPP, Operation not supported.
The attempted operation is not supported for the type of object referenced. Usually this occurs when a socket descriptor to a socket that cannot support this operation, for example, trying to accept a connection on a datagram socket.

10046 - WSAEPFNOSUPPORT, Protocol family not supported.
The protocol family has not been configured into the system or no implementation for it exists. Has a slightly different meaning to WSAEAFNOSUPPORT, but is interchangeable in most cases, and all Windows Sockets functions that return one of these specify WSAEAFNOSUPPORT.

10067 - WSAEPROCLIM, Too many processes.
A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously. WSAStartup may fail with this error if the limit has been reached.

10043 - WSAEPROTONOSUPPORT, Protocol not supported. 
The requested protocol has not been configured into the system, or no implementation for it exists. For example, a socket call requests a SOCK_DGRAM socket, but specifies a stream protocol.

10041 - WSAEPROTOTYPE, Protocol wrong type for socket.
A protocol was specified in the socket function call that does not support the semantics of the socket type requested. For example, the ARPA Internet UDP protocol cannot be specified with a socket type of SOCK_STREAM.

10058 - WSAESHUTDOWN, Cannot send after socket shutdown.
A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call. By calling shutdown a partial close of a socket is requested, which is a signal that sending or receiving or both has been discontinued.

10044 - WSAESOCKTNOSUPPORT, Socket type not supported.
The support for the specified socket type does not exist in this address family. For example, the optional type SOCK_RAW might be selected in a socket call, and the implementation does not support SOCK_RAW sockets at all.

10060 - WSAETIMEDOUT, Connection timed out.
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

10035 - WSAEWOULDBLOCK, Resource temporarily unavailable.
This error is returned from operations on non-blocking sockets that cannot be completed immediately, for example recv when no data is queued to be read from the socket. It is a non-fatal error, and the operation should be retried later. It is normal for WSAEWOULDBLOCK to be reported as the result from calling connect on a non-blocking SOCK_STREAM socket, since some time must elapse for the connection to be established.

11001 - WSAHOST_NOT_FOUND, Host not found.
No such host is known. The name is not an official hostname or alias, or it cannot be found in the database(s) being queried. This error may also be returned for protocol and service queries, and means the specified name could not be found in the relevant database.

(OS dependent) - WSA_INVALID_HANDLE, Specified event object handle is invalid.
An application attempts to use an event object, but the specified handle is not valid.

(OS dependent) - WSA_INVALID_PARAMETER, One or more parameters are invalid.
An application used a Windows Sockets function which directly maps to a Win32 function. The Win32 function is indicating a problem with one or more parameters.

(OS dependent) - WSAINVALIDPROCTABLE, Invalid procedure table from service provider.
A service provider returned a bogus proc table to WS2_32.DLL. (Usually caused by one or more of the function pointers being NULL.)

(OS dependent) - WSAINVALIDPROVIDER, Invalid service provider version number.
A service provider returned a version number other than 2.0.

(OS dependent) - WSA_IO_PENDING, Overlapped operations will complete later.
The application has initiated an overlapped operation which cannot be completed immediately. A completion indication will be given at a later time when the operation has been completed.

(OS dependent) - WSA_IO_INCOMPLETE, Overlapped I/O event object not in signaled state.
The application has tried to determine the status of an overlapped operation which is not yet completed. Applications that use WSAWaitForMultipleEvents in a polling mode to determine when an overlapped operation has completed will get this error code until the operation is complete.

(OS dependent) - WSA_NOT_ENOUGH_MEMORY, Insufficient memory available.
An application used a Windows Sockets function which directly maps to a Win32 function. The Win32 function is indicating a lack of required memory resources.

10093 - WSANOTINITIALISED, Successful WSAStartup not yet performed.
Either the application hasn’t called WSAStartup or WSAStartup failed. The application may be accessing a socket which the current active task does not own (i.e. trying to share a socket between tasks), or WSACleanup has been called too many times.

11004 - WSANO_DATA, Valid name, no data record of requested type.
The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. The usual example for this is a hostname -> address translation attempt (using gethostbyname or WSAAsyncGetHostByName) which uses the DNS (Domain Name Server), and an MX record is returned but no A record - indicating the host itself exists, but is not directly reachable.

11003 - WSANO_RECOVERY, This is a non-recoverable error.
This indicates some sort of non-recoverable error occurred during a database lookup. This may be because the database files (e.g. BSD-compatible HOSTS, SERVICES or PROTOCOLS files) could not be found, or a DNS request was returned by the server with a severe error.

(OS dependent) - WSAPROVIDERFAILEDINIT, Unable to initialize a service provider.
Either a service provider's DLL could not be loaded (LoadLibrary failed) or the provider's WSPStartup/NSPStartup function failed.

(OS dependent) - WSASYSCALLFAILURE, System call failure. 
Returned when a system call that should never fail does. For example, if a call to WaitForMultipleObjects fails or one of the registry functions fails trying to manipulate theprotocol/namespace catalogs.

10091 - WSASYSNOTREADY, Network subsystem is unavailable.
This error is returned by WSAStartup if the Windows Sockets implementation cannot function at this time because the underlying system it uses to provide network services is currently unavailable. Users should check:

that the appropriate Windows Sockets DLL file is in the current path,

that they are not trying to use more than one Windows Sockets implementation simultaneously. If there is more than one WINSOCK DLL on your system, be sure the first one in the path is appropriate for the network subsystem currently loaded.

the Windows Sockets implementation documentation to be sure all necessary components are currently installed and configured correctly.

11002 - WSATRY_AGAIN, Non-authoritative host not found.
This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. A retry at some time later may be successful.

10092 - WSAVERNOTSUPPORTED, WINSOCK.DLL version out of range.
The current Windows Sockets implementation does not support the Windows Sockets specification version requested by the application. Check that no old Windows Sockets DLL files are being accessed.

10094 - WSAEDISCON, Graceful shutdown in progress.
Returned by recv, WSARecv to indicate the remote party has initiated a graceful shutdown sequence.

(OS dependent) - WSA_OPERATION_ABORTED, Overlapped operation aborted.
An overlapped operation was canceled due to the closure of the socket, or the execution of the SIO_FLUSH command in WSAIoctl.



String From

Read only.

After a message has been retrived with either the GetMessage or the GetTop commands this property holds the From line from the header.



String Header

Read only.

After a message has been retrived with either the GetMessage or the GetTop commands this property holds the header of the message.



String Message

Read only.

If a message has a size less than 32768 bytes you will have the raw message here as well as in the temporary file (or the file/path you specify) given by the messagepath property.



String MessagePath

Messagepath is the path to a temporary file used to hold a received message or multiple messages.

This temporary file is created on the fly if the property messagepath is empty when the getmail method is called.. If messagepath contains a path to a file that does not exist this file is created and the message is saved in the file. If messagepath points to a file which exists the message is saved at the end of this file with a blank line separating messages.



Short NumOfMsg

This property contains the Number of messages waiting on the POP server.



String POPServerIP

The IP address of the POP server on the form

You can obtain this address from a hostadress of the form by using our control essock to resolve the address.

This property is persistent and is saved with your control so you can set it once and for all in the property window.



String POPServer

This property holds either the IP-address of the POP-server or the Internet name (including the domain) for the server. If you enter the name for the server EsPOP resolves the name to an IP-address. This resolved address is available in POPServerIP after it has been resolved. This takes place when a mail is sent.

The accepted form is thus either and

This property replaces the old POPServerIP and from now on you should use POPServer property  instead of the old POPServerIP property except for getting information about a resolved IP-address.

This property is persistent and is saved with your control so you can set it once and for all in the property window.



String Password

The password used to access a POP-account.



Short Port

The Port property is normaly set to 110 the POP3 server port. By changing this value you have the possibility to use non standard ports.



String ReturnPath

Read only.

After a message has been retrived with either the GetMessage or the GetTop commands this property holds the ReturnPath line from the header.



String Subject

Read only.

After a message has been retrived with either the GetMessage or the GetTop commands this property holds the Subject line from the header.



Long TimeOut

This is the Time-out, in milliseconds, used when receiving data from the POP-server.



String To

Read only.

After a message has been retrived with either the GetMessage or the GetTop commands this property holds the To line from the header.



long TotMsgSize

This is the total size in bytes of all messages for the user on the POP-server.



String TransferEncoding

Read only.

If the received message is a MIME 1.0 message this property contains the Transfer Encoding for the message. See the content event for information on possible values.



String Username

The user name used to access a POP-account.





BOOL DeleteMail(index)

Delete mail with identifier index on the POP server.



BOOL DeleteTempFile(index)

Removes a temporary file typically created after a received message.



Short EnumContent()

Use this method to check the content of a MIME message. Content events are fired for each part in the message. The return value are the number of parts in the message.



BOOL ExtractPart( long StartLine, LPCTSTR Path )

Use this method to extract the content from a MIME message. Information about content can be received with EnumContent and linenumber and content information is received in the Content event. The StartLine parameter is the line that starts the part. The Path parameter is the location for the extracted part.

The return value is true if the extract succed.

No decoding is done in this method. You should use our EsBase64 for instance to decode the result from this method into binary information.



BOOL GetMail(short index)

Retrieves mail with identifier index from the pop-server. Note that the first message has index=1. The message is saved in a temporary file. This temporary file is created on the fly if the property messagepath is empty. If messagepath contains a path to a file that does not exist this file is created and the message is saved in the file. If messagepath points to a file which exists the message is saved at the end of this file with a blank line separating messages.

The status events is triggered to give information about progress during the mail fetch.



String GetMailList()

With this function you can get the raw list of mailmessages waiting at the POP server as obtained by the LIST POP command. See also the method GetMailStatus which get the individual message size.



String GetMailStatus()

With this method you can get the output from the STATUS POP command. It is in its raw form as cnt totsize where cnt is equal to the number of messages and totsize is the total size of all messages available for the user.



long GetMessageSize(short index)

With this method you can get the size in bytes for a specific mail message.



BOOL Logoff()

Terminate a session with a POP server.



BOOL Logon()

Connect to a POP server.



BOOL MessageToMailBody( LPCTSTR path )

With this method you can copy the body just received message to a new location specified by path.

Returns TRUE if the operation succeded.



BOOL MoveTempFile( LPCTSTR path )

With this method you can move the message just received to a new location specified by path.

Returns TRUE if the operation succeded.



BOOL Reset()

Send the RESET POP command. If you have deleted messages on the server you now get access to them again.



BOOL GetTop( short index, short nLines )

This method issues the Top command to the POP server. The function of this command is the same as if a message is retrived as in the GetMail method with the important exception that only the first lines of the message is retrived.

A big differens between this method and the GetMail method is that there is never a temporary file created. The top of the message is only placed in the Message property. If the message is larger than the content of the Message Property the exceding part is truncated.

Note that the first message has index=1. 





Content( long Line, LPCTSTR Type, LPCTSTR Charset,     LPCTSTR Filename, LPCTSTR Encoding )

After a call to the EnumContent method content information in a mail is reported in this event.

Line - The line number for the start of this MIME part.
Type - This is the "Content-Type:" for the part. See note.
Charset - This is the Character set for the part. US-ASCII, ISO-8859-1 etc. See Rfc-2045.
Filename - This is the name of the original file. Rfc-1341.
Encoding - This is the encoding type. Base64, Binhex etc.

Notes on the Type parameter
This is actually two values separated with a "/". Possible values are

MULTIPART/MIXED - Generic mixed set of types.
- Same data in multiple formats.
- Multipart entities with message/rfc822.
- Parts should be viewed simultaneously.

- An rfc-822 message.
- Partial rfc-822 message.
- Message is stored in an external data source.

- Arbitary binary data (write to file).
- Postscript file.

- jpeg picture
- gif picture

- audio content

- mpeg video

plain text containing no formating commands.


if the type starts with a X its a user defined type.

Do not decode message parts in this event. Just collect information and do the decoding later ehen the EnumContent method has returned.

Use our control EsBase64 to decode Base64 content and our EsQP control to decode Quoted Printable content.



status(short progress)

Status gives progress information when certain operations is in progress. This can be useful when you need to inform a user about the progress and what is happening during lengthy operations. The progress is directly expressed is percentage of the task completed. A task is always started with an event where progress=0 and ended with an event where progress = 100. Getmail and Extract are methods which trigger this event.



Response( LPCTSTR str)

This event gives response text from the server.



Additional Documentation


Where to get the control?

It is possible that you are reading this documentation without having access to the control itself. If you have Internet access you just need to connect to and fetch a fully working sample of the control. At this location you can also find samples on how to use the control.

We can email the control anywhere in the world if you send us a request to do so. Please state if you want MIME or BINHEX coding. Send request to

If you use the unregistered version of the control a splash screen is displayed from time to time reminding you to register.To get rid of this nag-screen you need to register. Information is available at our site.

We ship anywhere in the world with World-wide First Class/Airmail if you select this option. The only media supported is 3.5" diskettes.The charge for this type of delivery is $15 (USD) extra.



You can get support by sending email to You can also find relevant information on-line at

We also check the newsgroup comp.lang.basic.visual.3rdparty on a regular basis and will try to help on all questions posted there.



How to contact us

  • If you need to contact us the preferred way is through email. Please send a mail to
  • If you want to use phone please call us at +46 657 10620 and Fax: +46 657 10612.
  • If you want to send a snailmail you can send it to
  • Eurosource, Gruvbyn 415A, S-820 50 LOOS, SWEDEN