|
Summary
Filename of the attachment.
Description
The FileName property specifies the filename of the attachment when creating or
extracting a message. It may also specify the original name of the file when
binhex/uuencoded encoding or decoding.
During the create message process , initiated by the CreateMessage method (or the
deprecated Create or CreateX methods, or setting the Action property to the deprecated
ACTION_CREATE value), the FileName property must be set to the filename of the attachment
in the OnSetHeader event (or the deprecated OnHeader event. The FileName property must not
contain any path information.
During the extract message process, initiated by calling ExtractMessageEnd (or the
deprecated Extract or ExtractX method or setting the Action property to the deprecated
ACTION_EXTRACT value), the FileName property will be set to the name of the extracted file
containing the message header, body and attachments. This property is set in the
OnRecvHeader event (or deprecated OnExtract event).
While UUencoding or BinHex encoding a file, set the FileName property to the original
file name to preserve the original name of the file. This name will be returned in the
FileName property if the file is decoded using the Uudecode or BinHex format. The
application can rename the decoded file to its original name using the FileName property.
The FileName property is also used in the OnExternal event for external messages. Refer
to the OnExternal event for more details.
The application can encode this property when creating a message. To encode the file
description the EncodeHdrField method must be called, the data to be encoded is set in the
OnEncodeField event. If the method is successful then the EncodedField property will
contain the encoded field. This property can then be set to that value (ie Mime.FileDesc =
Mime.EncodedField). On extraction this property may be encoded, to decode it call the
DecodeHdrField method and the decoded header field will be delivered in one or more
OnDecodeField events.
This property can be changed at any time. There is no default value for this property.
Example
Mime.Source = "c:\temp\myzip.zip"
Mime.Destination = "c:\temp\test.uue"
Mime.FileName = "myzip.zip"
Mime.Action = ACTION_UUENCODE
|