MessageDirectoryExists Method
Visual
Basic Tutorial available! (3 pages)
ASP Tutorial available! (4 pages)
Returns whether the message directory was really created by GetBodyWithEmbeddedObjectsEx
or GetBodyWithEmbeddedObjects method call.
GetBodyWithEmbeddedObjects and GetBodyWithEmbeddedObjectsEx methods
will not create the message directory if it is not needed. Only if the message
contains any embedded objects, the message directory is created.
Another reason of the message directory not been created is when the required
path could not be created (for example, there is already file under the given
name).
MessageDirectoryPath parameter may be omitted if GetBodyWithEmbeddedObjects
or GetBodyWithEmbeddedObjectsEx method has been already called for the
same instance of the Message object.
Also, you may use this method for testing any paths for their existence and
being directory.
blnResult = ObjectName.MessageDirectoryExists([MessageDirectoryPath]) |
Parameters: | ||
MessageDirectoryPath As String | (optional) The path to the message directory created by MailBee for the message. If omitted, the path is taken from internal variable that is set by GetBodyWithEmbeddedObjects and GetBodyWithEmbeddedObjectsEx methods | |
Return value As Boolean | True if the message directory exists and it is a directory (not a file), False otherwise |
Usage example:
' VB-only sample (see ASP Tutorial for ASP samples)
Dim Mailer, Msg
Set Mailer = CreateObject("MailBee.POP3")
Mailer.LicenseKey = "put your license key here"
Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword"
If Mailer.Connected Then
If Mailer.MessageCount > 0 Then
Set Msg = Mailer.RetrieveSingleMessage(1)
MsgBox Msg.GetBodyWithEmbeddedObjects(, , )
MsgBox "Message dir exists? - " & Msg.MessageDirectoryExists
Msg.RemoveMessageDirectory
End If
Mailer.Disconnect
End If
See Also:
"Displaying
HTML-formatted messages in Visual Basic" Tutorial
"Displaying HTML-formatted messages
in ASP" Tutorial
GetBodyWithEmbeddedObjects
Method
GetBodyWithEmbeddedObjectsEx
Method
RemoveMessageDirectory
Method
GetMessageDirectoryPath
Method
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.