AddressDelimiter Property
Specifies the delimiter of addresses which will be used when returning values of FromAddr,
ToAddr, PureCCAddr,
ToFriendlyName and other similar properties. The default value is ", " (comma followed by space).
This property is useful if you have "," chars in the values of e-mail addresses or display names and you need to split the entire string to get
individual addresses. You can assign it to a somewhat like "{|}" (which is highly unlikely to appear in addresses) and split by this value.
Note that Message.AddressDelimiter property acts a bit differently, it does not affect Message.FromAddr,
Message.ToAddr and Message.CCAddr properties. This is because AddressDelimiter affects only read-only properties and properties like ToAddr are read-only for Envelope object but read/write for Message object.
Value Type: | String | |
Parameters: | None |
Usage example:
' This sample displays To recipients (separately for each recipient) for the last message in Inbox Dim Mailer, Envelopes, Envelope, ToRecipients, SingleTo '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("mailserver.com", 143, "MyName", "MyPassword") Then If Mailer.SelectMailbox("Inbox") Then Set Envelopes = Mailer.RetrieveEnvelopes(Mailer.MessageCount, Mailer.MessageCount, False) If Not Envelopes Is Nothing Then For Each Envelope In Envelopes Envelope.AddressDelimiter = "{|}" ToRecipients = Split(Envelope.ToAddr, "{|}") For Each SingleTo In ToRecipients MsgBox SingleTo Next Next End If End if Mailer.Disconnect Else MsgBox Mailer.ErrDesc End If
See Also:
Envelope Object
Message Object
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.