:AttachFile()


Class

     aprMIME()

 

Syntax

     :AttachFile( cFilename, [hMessage] ) -> lSuccess

 

Parameters

 

 

cFilename

Name of file to attach to the current message.

 

hMessage

Optional. Handle of the message to act on. Provided during :CreateMessage() operation

 

Return

Logical indicating Success.

Returns .T. if the operation succeeds, otherwise returns .F.

 

Description

The :AttachFile() method attaches the specified file to the message.

 

If the specified message is not a multipart message, it is marked as multipart and the attached file is appended to the message. If the message is already a multipart message, an additonal part is created and the attachment is added to the message.

 

If the specified file contains non-text data, it is converted to 7-bit ASCII using the MIME base64 encoding algorithm. To specify the file encoding method used for attaching the file, use the :AttachFileEx() method.

 

See Also

:AttachFileEx(), :ExportMessage(), :ExtractFile(), :GetAttachedFileName(), :ImportMessage()