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 contains either a number or a UID of the message. The second parameter specifies, whether the first parameter contains a UID or a 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