Hunny Software Library Reference

Imap4Client.Append Method 

Sends an APPEND command.

[Visual Basic]
Public Sub Append( _
   ByVal mailboxName As String, _
   ByVal flags As String, _
   ByVal date As String, _
   ByVal message As Stream _
)
[C#]
public void Append(
   string mailboxName,
   string flags,
   string date,
   Stream message
);

Parameters

mailboxName
The name of the mailbox to append the message to.
flags
If not null, contains a parenthesized list of flags to set for this message.
date
If not null, contains a date in RFC 2060 form for the message's internal date.
message
The message to append to the mailbox.

Remarks

An APPEND command requests the server to add a new message to a mail folder (called a "mailbox" in the IMAP4 specification). An APPEND command can optionally set flags for the message and the internal date of the message. The message should be in a format compatible with RFC 2822 or MIME -- that is, in the standard Internet email format.

This version of the Append method takes the message as a Stream.

Example:

            void foo(Imap4Client client, Stream message) {
                String mailboxName = "Drafts";
                String flags = "(\Draft)";
                String date = null;
                client.Append(mailboxName, flags, date, message);
            }
            

Exceptions

Exception TypeCondition
ExceptionIf a network or protocol error occurs.

See Also

Imap4Client Class | Hunny.Mail Namespace | APPEND command in the IMAP4 specification