| Visual Basic (Declaration) | |
|---|---|
<DefaultValueAttribute()> <CategoryAttribute("Behavior")> <DescriptionAttribute("How much of the message should be downloaded and populated during Login().")> Public Property AutoGet As MessageSection | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Pop Dim value As MessageSection instance.AutoGet = value value = instance.AutoGet | |
| C# | |
|---|---|
[DefaultValueAttribute()] [CategoryAttribute("Behavior")] [DescriptionAttribute("How much of the message should be downloaded and populated during Login().")] public MessageSection AutoGet {get; set;} | |
| Managed Extensions for C++ | |
|---|---|
[DefaultValueAttribute()] [CategoryAttribute("Behavior")] [DescriptionAttribute("How much of the message should be downloaded and populated during Login().")] public: __property MessageSection get_AutoGet(); public: __property void set_AutoGet( MessageSection value ); | |
| C++/CLI | |
|---|---|
[DefaultValueAttribute()] [CategoryAttribute("Behavior")] [DescriptionAttribute("How much of the message should be downloaded and populated during Login().")] public: property MessageSection AutoGet { MessageSection get(); void set ( MessageSection value); } | |
Property Value
A MessageSection value.The following example demonstrates retrieving a single POP message.
| Visual Basic | Copy Code |
|---|---|
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail" ' at the top of your class. ' This example demonstrates getting a single message. To do ' this, you must login and keep the connection. Set AutoLogout ' to false to disable auto logout. Pop1.AutoLogout = False ' Do not automatically get any part of the message. Pop1.AutoGet = MessageSection.None ' Login Pop1.Login("mail.test.com", "testuser", "testpass") ' Check to see if any messages were retrieved. If Pop1.Messages.Length > 0 Then ' Get the first message. Pop1.Messages(0).Get() ' Display data about this message. Debug.WriteLine("From: " + Pop1.Messages(0).Message.From.Address) Debug.WriteLine("Subject: " + Pop1.Messages(0).Message.Subject) End If ' Logout has to be explicitly done since AutoLogout = false Pop1.Logout() | |
| C# | Copy Code |
|---|---|
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;" // at the top of your class. // This example demonstrates getting a single message. To do // this, you must login and keep the connection. Set AutoLogout // to false to disable auto logout. pop1.AutoLogout = false; // Do not automatically get any part of the message. pop1.AutoGet = MessageSection.None; // Login pop1.Login("mail.test.com", "testuser", "testpass"); // Check to see if any messages were retrieved. if(pop1.Messages.Length > 0) { // Get the first message. pop1.Messages[0].Get(); // Display data about this message. Debug.WriteLine("From: " + pop1.Messages[0].Message.From.Address); Debug.WriteLine("Subject: " + pop1.Messages[0].Message.Subject); } // Logout has to be explicitly done since AutoLogout = false pop1.Logout(); | |
Messages existing on the POP server are managed through use of the Pop.Messages array. This array can be populated several different ways depending on your needs. The Pop.AutoGet property controls how to get messages. For example, the Pop.AutoGet property defaults to MessageSection.Complete, meaning that the Pop component will automatically get all messages once logged in. If you simply want the header but not the complete messages, set the Pop.AutoGet property to MessageSection.Header. To disable automatic message retrieval (meaning you are going to explicitly "get" a message using the PopMessage.Get method) set Pop.AutoGet to MessageSection.None.
Target Platforms: Microsoft .NET Framework 2.0
Copy Code