Discuss this help topic in SecureBlackbox Forum

IMAP: Select the current (active) mailbox

Some elements of the message can be obtained using Fetch() method as described in Get the list of messages topic.

To retrieve the complete message use FetchMessage() method. The first parameter specifies either message sequence number, or its UID. The second parameter (UID) tells how to treat the first one. Set it to true if you provide message UID, and to false if you provide message sequence number.

FetchMessage() method has two overloads, one of which saves the unparsed message to the stream, and the other one parses the message into TElMessage instance.

Examples:

C#:


FileStream FS = new FileStream(FileName, FileMode.Create, FileAccess.Write);
try
{
	client.FetchMessage(UID, true, FS);
}
finally
{
	FS.Close();
}
Delphi:

var
	FS: TFileStream;
begin
	FS := TFileStream.Create(FileName, fmCreate);
	try
		Client.FetchMessage(UID, True, FS);
	finally
		FS.Free;
	end;
end;

How To articles about IMAP client

Discuss this help topic in SecureBlackbox Forum