Getting started with Transact Attachments

Transact XML and Batch users can add attachments to Transact emails.

Attachments can be added to Transact XML emails. However, Transact SMTP, does not support attachments.
To add an attachment, specify the disposition of the transact attachment in the XML request. Inline means that the file is embedded in the body of the email. Attachment means that the file is sent with the email. If the disposition is not specified, the default is Attachment. The positioning of an inline file cannot be specified.
To get started, ensure that the following prerequisites are met:

  • You have an account that is enabled for Transact attachments. If your account is not enabled, contact Support.

  • Your attachments meet the following file size limits:

  • Individual file limit is 0.5 MB. If exceeded, the email fails with an XML response error of "Attachment data for exceeds maximum size of 0.5 MB."

  • Total limit for all files in a single email is 1 MB. If exceeded, the email fails with an XML response error of "Total attachments size exceeds limit of 1.0 MB." FTP Batch file size limits for attachments in Transact. With the introduction of attachments into Transact emails, it is necessary to create new file size limits for Transact Batch.

  • If using FTP Batch files, your files meet the following size limits for attachments:

  • An XML batch file is not accepted if it exceeds the limit of 80 MB. Applies to any file types other than .gz (for example, .txt or .xml). If exceeded, the XML response error is "File LargeFile.xml (size 90 MB) exceeds maximum size of 80 MB for batch files."

  • A compressed batch file (.gz) is not accepted if it exceeds the limit of 10 MB.Applies to .gz files. If exceeded, the XML response error is "File LargeZippedFile.gz (size 12 MB) exceeds maximum size of 10 MB for compressed batch files."

The following file types are not allowed for Transact Attachments:

.ADE, .ADP, .BAT, .CHM, .CMD, .COM, .CPL, .EXE, .HTA, .INS, .ISP, .JAR, .JS, .JSE, .LIB, .LNK, .MDE, .MSC, .MSI, .MSP, .MST, .NSH .PIF, .SCR, .SCT, .SHB, .SYS, .VB, .VBE, .VBS, .VXD, .WSC, .WSF, .WSH

If any of these file types are used, the email fails with an XML response error of "Attachment is an unsupported file type for attachments."

Step-by-step

  1. Open the Transact XML request file.
  2. Add the ATTACHMENT element to the Recipient part of the XML request.The ATTACHMENT element must include a Name, MIME_TYPE, and Data:

NAME - attachment file name. If missing, email fails with an XML response error of "Attachment name is empty." Up to 195 characters are supported. A longer file name will not fail, but is not supported.
MIME_TYPE - Multipurpose Internet Mail Extensions. If missing, email fails with an XML response error of "Attachment mime type is empty."
DATA attachment data in base 64. If missing, email fails with an XML response error of "Attachment data is empty."

  1. Add a Disposition to the ATTACHMENT element. This step is optional.
    You can specify the disposition of the Transact attachment in the XML request. If the disposition is not specified, the default is attachment. Inline means that the file is embedded in the body of the email. Attachment means that the file is sent with the email.
    Currently, the positioning of an inline file cannot be specified. The file disposition is merely a recommendation to the email client for how to display the file. The email client can override this setting.

  2. Save the file
    Below, you will find examples of Inline and Attachment XML

<XTMAILING>
    <CAMPAIGN_ID>@{goamId}</CAMPAIGN_ID>
    <TRANSACTION_ID>123456</TRANSACTION_ID>
    <SHOW_ALL_SEND_DETAIL>true</SHOW_ALL_SEND_DETAIL>
    <RECIPIENT>
        <EMAIL>[email protected]</EMAIL>
        <BODY_TYPE>HTML</BODY_TYPE>
        <ATTACHMENT>
            <NAME>fitExemplarPlainText_fred.txt</NAME>
            <MIME_TYPE>text/plain</MIME_TYPE>
            <DATA>RnJlZCdzIHZhY2F0aW9uIGRldGFpbHM=</DATA>
            <DISPOSITION>inline</DISPOSITION>
        </ATTACHMENT>
    </RECIPIENT>
</XTMAILING>
<XTMAILING>
    <CAMPAIGN_ID>@{goamId}</CAMPAIGN_ID>
    <TRANSACTION_ID>123456</TRANSACTION_ID>
    <SHOW_ALL_SEND_DETAIL>true</SHOW_ALL_SEND_DETAIL>
    <RECIPIENT>
        <EMAIL>[email protected]</EMAIL>
        <BODY_TYPE>HTML</BODY_TYPE>
        <ATTACHMENT>
            <NAME>fitExemplarPlainText_fred.txt</NAME>
            <MIME_TYPE>text/plain</MIME_TYPE>
            <DATA>RnJlZCdzIHZhY2F0aW9uIGRldGFpbHM=</DATA>
            <DISPOSITION>attachment</DISPOSITION>
        </ATTACHMENT>
    </RECIPIENT>
</XTMAILING>

Did this page help you?