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




Gets or sets the "short" name of the mailbox.

Syntax

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

Property Value

A string representing the "short" name of the mailbox.

Remarks

The Mailbox.Name property gets or sets the "short" name of this mailbox, meaning the text part of the name between the last occurrence of the delimiter (Imap.Delimiter) (if any) and the end of the string. For example, with a mailbox named:

"inbox\archives\user"

the Mailbox name-related properties would be as follows:

Property Value
Mailbox.Name "user"
Mailbox.FullName "inbox\archives\user"

When setting the Mailbox.Name property, a RENAME command is sent to the server. This will only rename the "short" name, which has some limitations. For example, if you wanted to rename

"company/users/bob"

to

"company/users/bobjohnson"

you could simply set Mailbox.Name to "bobjohnson". However, if you wanted to rename

"company/users/bob"

to

"archive/bobbackup"

you could not do this by setting Mailbox.Name. You would have to set Mailbox.FullName to "archive/bobbackup".

The equivalent asynchronous method for renaming a mailbox is

Imap.BeginInvoke("RENAME oldname newname, null);

"&" is represented when sent as "&-". Anything between an "&" and a "–" is converted to Unicode.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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