ContentAsArray Property
Contains binary content of the attachment as
a byte array.
This property contains the same data as Content
property does, but this data is in the form of an array rather than a string.
In ASP, this is useful for downloading files via Response.BinaryWrite
method.
In the case where the attachment was previously saved to disk, you can use GetFileAsArray
method of the Message object to get file's content as array.
Value Type: | Variant of type Byte Array | |
Parameters: | None | |
Remarks: | This property is read-only |
Usage example:
' This ASP-only sample downloads the attachment to the client Dim Mailer, Msg Set Mailer = Server.CreateObject("MailBee.POP3") Mailer.LicenseKey = "put your license key here" If Mailer.Connect("mailserver.com", 110, "MyName", "MyPassword") Then If Mailer.MessageCount > 0 Then Set Msg = Mailer.RetrieveSingleMessage(1) If Not Msg Is Nothing Then If Msg.Attachments.Count > 0 Then Response.BinaryWrite Msg.Attachments(1).ContentAsArray End If End If End If Mailer.Disconnect End If
See Also:
Content
Property
Message.GetFileAsArray Method
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.