| Visual Basic (Declaration) | |
|---|---|
Public Overloads Overridable Function BeginAdd( _ ByVal message As Stream, _ ByVal flags As ImapFlags, _ ByVal internalDate As Date, _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As ImapMessageCollection Dim message As Stream Dim flags As ImapFlags Dim internalDate As Date Dim state As Object Dim value As IAsyncResult value = instance.BeginAdd(message, flags, internalDate, state) | |
| C# | |
|---|---|
public virtual IAsyncResult BeginAdd( Stream message, ImapFlags flags, DateTime internalDate, object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: virtual IAsyncResult* BeginAdd( Stream* message, ImapFlags flags, DateTime internalDate, Object* state ) | |
| C++/CLI | |
|---|---|
public: virtual IAsyncResult^ BeginAdd( Stream^ message, ImapFlags flags, DateTime internalDate, Object^ state ) | |
Parameters
- message
- A Stream object containing message data.
- flags
- An ImapFlags value representing the flags to set on the message.
- internalDate
- A System.Datetime representing the internal date to use for the message.
- state
- User state information.
Return Value
An IAsyncResult that represents the asynchronous operation, which could still be pending.| Exception | Description |
|---|---|
| System.InvalidOperationException | BeginXXX method used without providing an EndXXX event handler. |
| Dart.PowerTCP.Mail.ProtocolException | Bad IMAP protocol response received from server. |
| System.Net.Sockets.SocketException | The requested address is not valid in its context. |
Using the ImapMessageCollection.BeginAdd method causes an APPEND command to be asynchronously sent to the IMAP server, adding the message contained in message to the mailbox represented by Imap.CurrentMailbox. When this method completes, the Imap.EndMessageAdd event will be raised. Typically, message will be a MessageStream object, but can be any Stream object. flags determines which flags are set on the new message. internalDate sets the internal date (the date the message arrived) of the message on the server.
Target Platforms: Microsoft .NET Framework 2.0