OriginalName Property


Gets the original mailbox name as it's provided by the IMAP server (not decoded from UTF-7M). This property always contains original mailbox name and doesn't matter if UTF7EncodeMailboxNames is set to False or True.

It's recommended to set UTF7EncodeMailboxNames property to False and use this property value as a mailbox name when passing it to a method (like SelectMailbox, ExamineMailbox, AppendMessage or any other which accepts the mailbox name as a parameter). This will allow you to avoid various issues if your IMAP server doesn't support UTF-7M encoding for mailbox names.

At the same time, use Name property to display human-readable name of the mailbox. In other words, IMAP servers understand OriginalName while human users understand Name. This is valid if UTF7EncodeMailboxNames is False.


Value Type: String
Parameters: None 
Remarks: This property is read-only

Usage example:

' This sample gets the list of all mailboxes and selects the last mailbox.
' Then, it displays the number of messages in that mailbox.

Dim Mailer, Mailboxes
'Using visual basic to create object Set Mailer = CreateObject("MailBee.IMAP4") 'Using ASP to create object 'Set Mailer = Server.CreateObject("MailBee.IMAP4") 'In ASP use Response.Write instead of MsgBox Mailer.LicenseKey = "put your license key here" If Mailer.Connect("mailserver.com", 143, "MyName", "MyPassword") Then ' Turn off encoding of mailbox names when submitting them to the server Mailer.UTF7EncodeMailboxNames = False Set Mailboxes = Mailer.RetrieveMailboxes If Not Mailboxes Is Nothing Then If Mailboxes.Count > 0 Then If Mailer.SelectMailbox(Mailboxes(Mailboxes.Count).OriginalName) Then MsgBox Mailer.MessageCount & " messages in " & Mailboxes(Mailboxes.Count).Name End If End If End If Mailer.Disconnect End If

See Also:

Name Property
UTF7EncodeMailboxNames Property


Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.