{attachment} can be used when creating email templates. It will allow you to include pdf invoices or normal files.

Attribute NameTypeRequiredDescription
invoiceInvoice IDNoUse this if you want to attach invoices to your email
filepathNoPath to your file that you wish to attach, use absolute paths
namestringNoname that will be used for attached file

Usage


Example usage in email templates:

Attach invoice

{if $invoice}
  {attachment invoice=$invoice.id}
{/if}

Use variables in file path

{attachment file="/var/acces/`$service.name`.key"}

Override attachment name

{if $invoice.gateway == 'Bank Transfer'}
  {attachment file="/var/pdfguides/banktransferguide.pdf" name="Bank Transfer Guide.pdf"}
{/if}