PowerTCP Mail for .NET
UseMemoryStreams Property
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > ImapMessage Class : UseMemoryStreams Property




Controls whether attachments are decoded and stored as FileStreams or as MemoryStreams when a message is retrieved.

Syntax

Visual Basic (Declaration) 
Protected Overrides NotOverridable ReadOnly Property UseMemoryStreams As Boolean
Visual Basic (Usage)Copy Code
Dim instance As ImapMessage
Dim value As Boolean
 
value = instance.UseMemoryStreams
C# 
protected override bool UseMemoryStreams {get;}
Managed Extensions for C++ 
protected: __property bool get_UseMemoryStreams() override;
C++/CLI 
protected:
property bool UseMemoryStreams {
   bool get() override;
}

Property Value

true if attachments should be decoded and stored as MemoryStreams when a message is retrieved; false if they should be decoded and stored as files.

Example

The following example demonstrates logging into a POP server and retrieving all messages.
Visual BasicCopy Code
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.

' Automatically remove files after getting them from the server
Pop1.AutoDelete = True

' Login. The default settings will cause the Pop component to
' automatically retrieve all messages, delete them from the
' server, and logout.
Pop1.Login("mail.test.com", "testuser", "testpass")

' All message retrieved. Iterate through the collection
' and display data.
Dim msg As PopMessage
For Each msg In Pop1.Messages
   Debug.WriteLine("Message ID: " + msg.Id)
   Debug.WriteLine("Message UID: " + msg.Uid)
   Debug.WriteLine("Messge Size: " + msg.Size)
   Debug.WriteLine("From: " + msg.Message.From.Address)
   Debug.WriteLine("Subject: " + msg.Message.Subject)
Next
C#Copy Code
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.

// Automatically remove files after getting them from the server
pop1.AutoDelete = true;

// Login. The default settings will cause the Pop component to
// automatically retrieve all messages, delete them from the
// server, and logout.
pop1.Login("mail.test.com", "testuser", "testpass");

// All message retrieved. Iterate through the collection
// and display data.
foreach(PopMessage msg in pop1.Messages)
{
   Debug.WriteLine("Message ID: " + msg.Id);
   Debug.WriteLine("Message UID: " + msg.Uid);
   Debug.WriteLine("Messge Size: " + msg.Size);
   Debug.WriteLine("From: " + msg.Message.From.Address);
   Debug.WriteLine("Subject: " + msg.Message.Subject);
}

Remarks

Returns true if memory streams will be used to represent streams associated with this message. This is overridden in derived classes because the use of memory streams is often determined by the choice of implementation, and may be directly linked to it.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.