ExternMailTemplate.
The attachments are the part of this data that cannot simply be passed on as text. The MAIL- tags provide them: for each attachment, the file name, the type of attachment and the content in Base64 encoding.
The shop system maintains two separate lists. One contains the file attachments, the other the attachments generated from an HTML template. Both are treated the same, and each has its own four tags.
Guide: Sending shop emails via an external mail system
Looping through the attachments
MAIL-FileAttachment and MAIL-HTMLAttachment are loops over the respective list. As area tags, they check whether any attachments of this type exist at all.
MAIL-HTMLAttachment.
The details for each attachment
The HTML variants are named accordingly
MAIL-HTMLAttachment_Name, MAIL-HTMLAttachment_Type and MAIL-HTMLAttachment_ContentB64.
The types of attachments
The type lets you treat attachments differently in the passed data record, for example to name the SEPA mandate differently from a data sheet. The shop system itself does not distinguish by type when sending.
ContentB64 always returns the content Base64-encoded, even for the HTML attachments, whose content is actually text. The external mail system thus gets the same format for both lists.The loop only runs once
The tags at a glance
All tags apply exclusively in the template for the external mail system. On other templates, the attachment lists are not available, and the tags remain unresolved.
Related topics
- Guide: Sending shop emails via an external mail system
- Guide: Designing shop emails
- Reference: DC- (Parameters)
