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




Gets or sets the parameter information which modifies the ImapSearchParameter.Criterion.

Syntax

Visual Basic (Declaration) 
Public Property Parameter As String
Visual Basic (Usage)Copy Code
Dim instance As ImapSearchParameter
Dim value As String
 
instance.Parameter = value
 
value = instance.Parameter
C# 
public string Parameter {get; set;}
Managed Extensions for C++ 
public: __property string* get_Parameter();
public: __property void set_Parameter( 
   string* value
);
C++/CLI 
public:
property String^ Parameter {
   String^ get();
   void set (    String^ value);
}

Property Value

A string value which modifies the ImapSearchParameter.Criterion

Example

The following example demonstrates using the Mailbox.Search method. This example constructs the search "SEARCH FLAGGED SINCE 1-Feb-1994 NOT FROM 'Smith'"
Visual BasicCopy Code
' Login
Imap1.Login(Server, User, Pass)

' Construct the search "SEARCH FLAGGED SINCE 1-Feb-1994 NOT FROM 'Smith'"
Dim Criteria As New ArrayList()
Criteria.Add(New ImapSearchParameter(ImapCriterion.Flagged, ""))
Criteria.Add(New ImapSearchParameter(ImapCriterion.Since, "1-Feb-1994"))
Criteria.Add(New ImapSearchParameter(ImapCriterion.Not, ""))
Criteria.Add(New ImapSearchParameter(ImapCriterion.From, "Smith"))

' Alternatively, ImapSearchParameter objects can be created like so
' Dim Param As New ImapSearchParameter()
' Param.Criterion = ImapCriterion.Flagged
' Param.Paramter = ""
' Criteria.Add(Param)

' Perform the search. This will occur on the default box INBOX.
Dim Messages() As ImapMessage = Imap1.CurrentMailbox.Search(Criteria)

' Display
Debug.WriteLine("The following message IDs meet the specified criteria")
Dim Message as ImapMessage
For Each Message in Messages
   Debug.WriteLine(Message.Id)
C#Copy Code
// Login
imap1.Login(Server, User, Pass);

// Construct the search "SEARCH FLAGGED SINCE 1-Feb-1994 NOT FROM 'Smith'"
ArrayList criteria = new ArrayList();
criteria.Add(new ImapSearchParameter(ImapCriterion.Flagged, ""));
criteria.Add(new ImapSearchParameter(ImapCriterion.Since, "1-Feb-1994"));
criteria.Add(new ImapSearchParameter(ImapCriterion.Not, ""));
criteria.Add(new ImapSearchParameter(ImapCriterion.From, "Smith"));

/*
/ Alternatively, ImapSearchParameter objects can be created like so
/ ImapSearchParameter param = new ImapSearchParameter();
/ param.Criterion = ImapCriterion.Flagged;
/ param.Paramter = "";
/ criteria.Add(param);
*/

// Perform the search. This will occur on the default box INBOX.
ImapMessage[] messages = imap1.CurrentMailbox.Search(criteria);

// Display
Debug.WriteLine("The following message IDs meet the specified criteria");
foreach(ImapMessage message in messages)
   Debug.WriteLine(message.Id);

Remarks

Gets or sets the parameter information which modifies the ImapSearchParameter.Criterion. For some criteria, the search parameter must be set (ex. ImapCriteria.Before, ImapCriteria.To, etc.), for others, the ImapSearchParameter.Criterion property does not require a modifier (ex. ImapCriterion.Answered). See the description of the ImapCriterion values to determine which criteria require a paramerter.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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