Distinct offers Network Monitor, the ONLY natural language Protocol Analyzer, ONC RPC for C++, .NET and Java, and IntelliTerm, the fastest Terminal Emulator for TN3270, TN5250 and VT420 on the market.

Distinct VIT: IMAP Control: OnError

   Products   Downloads   Sales   Support   About us
  VIT
 



        
 

Summary

Local error has occurred. This will contain the error code indicating the type of error.

Description

The OnError event occurs when a method fails because the arguments are invalid or when a connection with the IMAP server can not be established The table below lists all the possible error codes delivered by this event.

ERR_IMAP_CANNOT_CONNECT Unable to connect to IMAP server.
ERR_IMAP_IN_ACTION Already performing action.
ERR_IMAP_CANNOT_PERFORM_ACTION Unable to perform action. Cannot initialize.
ERR_IMAP_INVALID_TIMEOUT Invalid Timeout value.
ERR_IMAP_FAILURE Server was unable to perform action.
ERR_IMAP_INVALID_HANDLE Invalid connection handle. A connection must be established before performing this action.
ERR_IMAP_ABORTED Action has been aborted and connection has been closed.
ERR_IMAP_CANNOT_INIT_WINSOCK Unable to initialize WINSOCK.
ERR_IMAP_TIMED_OUT IMAP timed out.
ERR_IMAP_NOSELECTED_MAILBOX A mailbox must be selected before performing this action.
ERR_IMAP_FILE_ERROR File IO error.
ERR_IMAP_INSUFFICIENT_LENGTH Insufficient length.
ERR_IMAP_CANNOT_SEND_COMMAND Unable to send command to IMAP server.
ERR_IMAP_INVALID_MAILBOX Mailbox is invalid.
ERR_IMAP_INVALID_OPTION Invalid option.
ERR_IMAP_INVALID_ARGUMENT Invalid argument.
ERR_IMAP_IN_APPEND Unable to perform this action while append is in progress.
ERR_INVALID_BUFSIZE Invalid buffer size specified in the DirectBufSize property.
ERR_IMAP_ABORT_FAILED Unable to abort.
ERR_IMAP_SOCKET_ERROR There was a socket error

ERR_IMAP_CONNECTION_CLOSED
The connection has been closed

Example

Private Sub Imap_OnError(ErrorCode As Integer)

' The IMAP ActiveX control has fired the OnError event to

' deliver the an error code.

' translate code to message

Select Case (ErrorCode)

Case ERR_IMAP_CANNOT_CONNECT:

Message = "Unable to connect to IMAP server."

Case ERR_IMAP_IN_ACTION:

Message = "Already performing action."

Case ERR_IMAP_ABORTED:

Message = "Action has been aborted and connection has been closed."

Selected = False ' no longer selected

Connected = False ' no longer connected

Case ERR_IMAP_CANNOT_INIT_WINSOCK:

Message = "Unable to initialize WINSOCK."

.

.

Case Else

Message = "Unknown error has occurred"

End Select

'display error message

MsgBox Message, 64, "IMAP Client Sample"

End Sub



Browse FAQ

Related Products
Mail Objects

Recommended Add-On
Network Monitor,
Protocol Analyzer


Raves
"The night before I went on summer holiday we had to make some 'last minute' configuration changes to approx. 300 routers, a tedious job to do manually with telnet. We went along with MS Excel containing a list of IP-adresses to the routers, and the VIT telnet-component. One hour later the VBA-application (small is beautiful) was working, and after another hour all of our routers were updated with the new configuration. I just say a big "Thanks" to you all for a good sleep that night."
Eirik Brendholen, Ergo Integration AS

"We conducted a test session to compare the performance of similar products, and Distinct's product was better!" [more]
Dr. Shyam Sunder, Carnegie Mellon University

"Together with Distinct, we were able to offer our users an ideal soution to enabling them to connect to Yahoo! Pager, and to do so both quickly and reliably." [more]
Brian Park,
Producer of Yahoo! Pager, Yahoo! Inc.


  10/14/2008   Legal notices | PRIVACY Policy | Networking News |