Dart Smtp, Pop, Imap Controls
Refresh Method
Optional. Specifies the name of the mailbox; may include wildcards. Defaults to all mailboxes (*).
Optional. Specifies the reference point to start the listing. Defaults to the current path.
Description
Get a listing of mailboxes.
Syntax
Visual Basic
Public Sub Refresh( _
   Optional ByVal Name As String, _
   Optional ByVal Reference As String _
) 
Parameters
Name
Optional. Specifies the name of the mailbox; may include wildcards. Defaults to all mailboxes (*).
Reference
Optional. Specifies the reference point to start the listing. Defaults to the current path.
Remarks
The Mailboxes property is emptied and repopulated each time this method is called. Each Mailbox Object and the messages they hold are destroyed unless stored to another object.

Error Codes

This method may generate the following error code (refer to MailErrorConstants for a complete list of error codes):

Example
Private Sub Command1_Click()
	On Error GoTo OnError ' use intrinsic error handling
	Dim Mailbox As Mailbox
	Imap1.Login "imap.test.com", "user", "pass"
	' Get new listing from the server. The collection will be
	' cleared and repopulated.
	Imap1.Refresh
	' Display all mailboxes returned in the listing
	For Each Mailbox In Imap1.Mailboxes
		List1.AddItem Mailbox.Name
	Next
	Exit Sub
OnError: ' Any error jumps here
	Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
See Also

Imap Object  | Imap Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic