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 retrieves and displays the name of Inbox as-is.
' This doesn't make a lot of sense because "Inbox" name is in Latin and will return Inbox
' but for non-English names it will be different than Name property value.
Dim Mailer, Stats
'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.EnableLogging = True
Mailer.LogFilePath = "C:\Temp\imap4_log.txt"
Mailer.ClearLog
Mailer.LicenseKey = "put your license key here"
If Mailer.Connect("mail.server.com", 143, "MyName", "MyPassword") Then
  Set Stats = Mailer.GetMailboxStatus("Inbox")
  If Not Stats Is Nothing Then
    MsgBox "OriginalName=" & Stats.OriginalName
  End If
  Mailer.Disconnect
End If

See Also:

Name Property
UTF7EncodeMailboxNames Property


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