AttachFile()

Syntax

Function AttachFile(ByVal multimediaComponentID As String, Optional
ByVal publicationTargetID As String) As String

Parameters

ParameterDescription
multimediaComponentID

The URI of the Multimedia Component that contains the binary file you want to attach.

publicationTargetID

The URI of the Publication Target. The default value of this parameter is TCM_PUBLICATION_TARGET_URI. If you are previewing, set this parameter to tcm:0-0-0. In that case, the file attachment is stored on disk so you can open the attachment while previewing the e-mail.

Description

Use this method to attach a binary file to your e-mail message. The binary file must be in a Multimedia Component. The method returns the attachment in an intermediate format that the Mailer service can use to create an actual attachment.