Commands Valid in the Authenticated State

APPEND

The APPEND command appends a new message to the end of the specified mailbox. If flags or a date-time string is specified as an argument, the flags and date are set accordingly in the appended message.

Usage

APPEND mailbox ( flags ) date { message-size }

Arguments

Mailbox name
(Optional) Parenthesized list of flags to set in the appended message
(Optional) Date/time string; the internal data of the appended message will be set to this date/time
Message size (size of the message expressed in RFC 822 octets that will follow)

Untagged server responses

No specific response

Results

OK (successfully appended)
NO (APPEND command failed due to errors in flags, date, or message text)
BAD (command unknown or invalid arguments)

Example

A00159 APPEND tmp (\\Seen \\Draft) {1259}
+ Ready for argument
From: "Kevin W. Mullet" <kwm@unt.edu>
               To: "'kwm@unt.edu'" <kwm@unt.edu>
               Subject: Case HD0000000019310, Request Urgency: Cannot access network
               Message-ID: <2767191894.951954964@kwm.unt.edu>
               X-Mailer: Mulberry/2.0.0b9 (Win32)
               MIME-Version: 1.0
               Content-Type: text/plain; charset=us-ascii; format=flowed
               Content-Transfer-Encoding: 7bit

               Case HD0000000019310 has been assigned to your group.  Short
               Description: HD: A problem not listed here.  Open the Support Console 
               on remedy.unt.edu to view the case.
A00159 OK Completed

The APPEND command in this sample tells the server to append a message to the tmp mailbox with the \\Seen and \\Draft flags set, and that a message 1259 ...

Get Managing IMAP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.