Topic Path: Pending > TIdIMAP4.AppendMsgNoEncodeFromStream@String@TStream@TIdMessageFlagsSet

Adds a message to the specified mailbox without encoding message parts.

Mailbox name used to store the new message.
Stream containing the content of the message to append to the mailbox.
Message flags to apply to the message in the mailbox. Default value is []. 

Boolean - True on success.

AppendMsgNoEncodeFromStream is a Boolean function used to append a message stored in the specified stream into the specified IMAP4 server mailbox. 

AppendMsgNoEncodeFromStream is used in the implementation of AppendMsgNoEncodeFromFile, and is very similar to the AppendMsg method, but does not perform encoding for message parts loaded from the specified file name. 

AppendMsgNoEncodeFromStream requires that the ConnectionState property contain the value csAuthenticated or csSelected, or an EIdConnectionStateError exception will be raised. 

AMBName is the mailbox name on the IMAP4 server to receive the message content. AMBName must contain a valid mailbox name on the IMAP4 server or an EIdConnectionStateError exception will be raised. 

AStream is the stream containing the message content to be appended to the specified mailbox. AStream contains values as created using the TIdMessage.SaveToFile method. 

AFlags indicates the set of message flags which should be applied to the message in the mailbox. AppendMsgNoEncodeFromStream constructs the flags for the message using MessageFlagSetToStr prior to calling SendCmd using the IMAP4 APPEND command. 

AppendMsgNoEncodeFromStream causes the APPEND command to be sent to the IMAP4 server using the indicated mailbox name, message flags, and the message size as stored in the mailbox. The value in AMBName is enclosed in double quotation marks to prevent errors with mailbox names that include the Space character. 

AppendMsgNoEncodeFromStream inspects the numeric response code in LastCmdResult, and when the value is IMAP_CONT sends the message headers, body, and attachments in AMsg to the IMAP4 server. 

AppendMsgNoEncodeFromStream returns False if the APPEND operation is not successfully completed on the IMAP4 server. 

Please note that the APPEND command is not used for message delivery, because it does not provide a mechanism to transfer SMTP envelope information. 

Use AppendMsgNoEncodeFromFile to append a message stored in a file to a mailbox without encoding message parts prior to transmission, or AppendMsg to append a message specified in a TIdMessage instance.

AppendMsg AppendMsgNoEncodeFromFile ConnectionState EIdConnectionStateError TIdMessage.SaveToFile

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.