Documentation Center

Adding binary content

You can add a binary file in a Multimedia Component to your e-mail message: using a Metadata Schema, using the Component Query Template Building Block, by creating a hyperlink to the binary file, or embedding the image if the file is an image.

Attaching a binary file

To attach a binary file to your e-mail message:

  • Create a Metadata Schema and add one or more Multimedia Link fields, or Component Link fields, to it to allow content authors to create a link to a Multimedia Component. To add more than one attachment, create a multivalued field.
  • Open an Outbound E-mail Page, select the Metadata Schema you created and create a link to a Multimedia Component.
  • In the Outbound E-mail Post-processing Template Building Block Attachments Metadata Field parameter field, specify the XML name of the multimedia link field which contains a binary file (Multimedia Component) to attach to your e-mail message.

Using the Component Query Template Building Block

To attach a binary file to your e-mail message using the Component Query Template Building Block:

  • Add the default Component Query Template Building Block to your Compound Page template before the Outbound E-mail Post-processing Template Building Block.
  • Define parameters and filters to fetch binaries from the Content Manager.
  • Specify the Target Item Name parameter as OutboundEmail_Attachments to add the retrieved binaries to the input package (OutboundEmail_Attachments is a preconfigured package item).

Inserting a link to a binary file

To insert a link to a binary file rather than an attachment, use the GetLinkBinaryURL() Dreamweaver templating method. This method takes the TCM:URI of a Multimedia Component as its parameter and returns a URL pointing to the binary file in that Multimedia Component. For example:

<a href="@@GetLinkBinaryURL("tcm:3-475")@@">SDL_Logo.gif</a>

To resolve the link, the Multimedia Component must have been published on a Page and be available on the Web site where you installed tracking Components.

Embedding an image

If the binary content you want to add to an e-mail is an image file, you can use the EmbedImage() Dreamweaver templating method. This method takes the TCM:URI of a Multimedia Component as its parameter and returns the image contained in the Multimedia Component in an intermediate format that the Mailer service can handle. For example:

<img src="@@EmbedImage("tcm:1-33")@@"/>