MCFBodyPart Class Properties

In this section we discuss the MCFBodyPart class properties. The properties are described in alphabetical order.

Description

Use this property to specify the URL for the attachment for this body part, as a string.

The URL must be an absolute URL.

This property is read-write.

Description

Use this property to specify the character set for the text or the attachment.

You can also specify this property using the SetAttachmentContent method, or the ContentType property.

This property is read-write.

Description

Use this property to specify the content type of this body part.

You can specify the content type with the SetAttachmentContent method.

You can also use this property to specify the character set. For example, “text/plain; charset=US-ASCII”.

This property is read-write.

Description

Use this property to specify a description of the attachment. You should only use this property if the content is an attachment.

This property is read-write.

Description

Use this property to specify how the body part is presented in the received mail.

Some email clients ignore the setting of this property and present body parts either inline or as file attachments.

Valid values for this property are:

Value

Description

Attachment

The body part is shown as a file attachment.

Inline

The body part is shown in the body itself.

This property is read-write.

Description

If you are adding an attachment to the email, use this property to specify the name of the file.

PeopleSoft recommends that you keep the file extension specified with this property the same as the original extension found in the file path, otherwise client applications may not be able to display it properly.

This property is read-write.

Description

Specify the path for the file that contains the contents of this email.

Whether this is a relative or absolute path depends on the FilePathType property.

You can also specify a URL to the file using this property, if the FilePathType property is specified as %FilePath_Absolute.

If you specify a value for this property, the ‘Text’ content is ignored.

This property is read-write.

Description

Use this property to specify whether the path specified with the FilePath property is a relative or absolute path. The values for this property are:

Value

Description

%FilePath_Relative

The file path specified with the FilePath property is a relative path.

%FilePath_Absolute

The file path specified with the FilePath property is either an absolute path to a file, or a URL to a file.

If you specify a relative path, the file must be available in the FILES folder of application server folder.

If you specify an absolute path, the file could be on the local machine, in any network folder, or a URL.

This property is read-write.

Description

This property indicates if the body part is an attachment or not. This property returns a Boolean value: true if it is an attachment, false otherwise.

This property is read-only.

Description

A bodypart can contain simple text, one attachment, or a MultiPart object.

If you have assigned a MultiPart object using this property, the text and attachment related properties are ignored.

This property is read-write.

Example

Local PT_MCF_MAIL:MCFMultipart &mp = create PT_MCF_MAIL:MCFMultipart();
&mp.SubType = "alternative; differences=Content-type";
   
&mp.AddBodyPart(&text);
&mp.AddBodyPart(&html);
   
&email.MultiPart = ∓

Description

Use this property to specify the text for the email.

Use the SetAttachmentContent method to specify image or other types of attachments. For a more complex bodypart, build a multipart and set the Multipart property of MCFBodyPart.

This property is read-write.