ParseRichTextHtml method: MCFMailUtil class

Syntax

ParseRichTextHtml(richtext)

Description

Use this method to split rich text content with images into an array of MCFBodyPart objects. Typically, this method is used with rich text produced by the rich text editor on a long edit box.

The first element in the array is the text of the email message. The remaining elements in the array represent each image in the message. The images are added as inline parts of the email, rather than as attachments, preserving the original formatting of the HTML content.

Prior to sending the email, the images are stored in a temporary directory. The default directory is PS_SERVDIR/images. Use the MCFMailUtil class imagesLocation property to specify a different directory location. Images in this temporary directory must be deleted manually after sending the email; these image files are not deleted automatically.

Parameters

Parameter Description

richtext

Rich text with images that needs to be parsed.

Returns

An array of MCFBodyPart objects.

Example

See the example on creating an email from rich text editor output later in this topic.