Method MIMEMessage():attachFile() Professional

Attaches a file.

:attachFile( <cFileName> ) --> lSuccess
<cFileName> is a character string containing the name of the file to be attached to the e-mail message. The file must be visible to the application executing the method. If it does not reside in the current directory, <cFileName> must include proper path information.
Calling this method automatically transforms the e-mail into a multi-part message. Internally, this method uses the method :attachMixed()of base class MimeContent to attach the file after it has been loaded.

The method returns .T. (true) if the file exists and could be attached to the message. Otherwise, it returns .F. (false).


This method can be used to attach files to an e-mail message that are not part of the textual content of the message. This mainly applies to files containing binary data, such as compressed ZIP archives or image files.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.