Method MIMEContent():attachRelated() Professional

Attach MIMEContent object as related content

:attachRelated( <oMIMEContent> [,<cID>] ) --> lSuccess
<oMIMEContent> is an object of the class MIMEContent or an object of a class that is derived from MIMEContent.
<cID> is a character string specifying the identifier via which the content is referenced.

The method :attachRelated() returns .T. (true) if the object that is passed as a parameter was successfully attached. In case of an error, .F. (false) is returned.


In order to attach an object of class MIMEContent to another object of the same class, :attachRelated() can be used. Calling this method automatically transforms a single-part content to a multi-part content, if required.

With :attachRelated(), it is possible to compose multi-part messages with related content. In order to compose html mails with embedded images, the image data must be attached as related content. Please refer to the sample section of the MIMEMessageclass function for an example.

In case an identifier is passed in parameter <cID>, an additional name/value-pair is added as new header field to the MimeContent object. The name is set to "Content-ID", and the value is the cID passed. The content is referenced with this identifier.


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.