| Visual Basic (Declaration) | |
|---|---|
Public ReadOnly Property Mailbox As Mailbox | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As MailboxEventArgs Dim value As Mailbox value = instance.Mailbox | |
| C# | |
|---|---|
public Mailbox Mailbox {get;} | |
| Managed Extensions for C++ | |
|---|---|
public: __property Mailbox* get_Mailbox(); | |
Property Value
The Mailbox object representing the mailbox.The following example demonstrates asynchronously creating a new mailbox.
| Visual Basic | Copy Code |
|---|---|
private void AsynchronousMailboxCreateTest() { ' Login to the server. Imap1.Login(Server, User, Pass) ' Begin to asynchronously create a new mailbox. When ' complete, the Imap.EndMailboxAdd event will be raised. Imap1.Mailboxes.BeginAdd("MyNewMailbox", Nothing) } Private Sub Imap1_EndMailboxAdd(ByVal sender As Object, ByVal e As Dart.PowerTCP.Mail.MailboxEventArgs) Handles Imap1.EndMailboxAdd If e.Exception Is Nothing Then Debug.WriteLine("New mailbox " + e.Mailbox.Name + " created.") Else Debug.WriteLine("Exception received: " + e.Exception.Message) End If End Sub | |
| C# | Copy Code |
|---|---|
private void AsynchronousMailboxCreateTest() { // Login to the server. imap1.Login(Server, User, Pass); // Begin to asynchronously create a new mailbox. When // complete, the Imap.EndMailboxAdd event will be raised. imap1.Mailboxes.BeginAdd("MyNewMailbox", null); } private void imap1_EndMailboxAdd(object sender, Dart.PowerTCP.Mail.MailboxEventArgs e) { if(e.Exception == null) Debug.WriteLine("New mailbox " + e.Mailbox.Name + " created."); else Debug.WriteLine("Exception received: " + e.Exception.Message); } | |
If accessing this property from within the Imap.EndMailboxAdd event (notifying completion of the MailboxCollection.BeginAdd method), then this property returns the Mailbox object representing the newly created mailbox. If accessing this property from within the Imap.Mailbox event (notifying new mailbox data was received from the server) then this property returns the Mailbox object representing the mailbox for which new data was received.
Target Platforms: Microsoft .NET Framework 2.0
Copy Code