← All modules

Magento 2 module · foundation

Mail Attachment

Technical helper that allows Infrangible modules to add file attachments to the emails sent by the store.

Magento’s standard way of sending template emails, such as order or invoice emails, does not support file attachments. Mail Attachment adds this ability, so other modules can attach files, for example a PDF document or terms and conditions, to the emails they send.

Merchants normally don’t install it directly: it is pulled in by modules or customisations that send emails with attachments.

Features

  • Allows any number of file attachments to be added to template emails.
  • File type, file name and the way the attachment is shown (as an attachment or inline) can be set per file.
  • The normal email content and design stay unchanged.

Configuration

There is nothing to configure. The module works right after installation and does not change the emails of the store by itself.

Good to know

Mail Attachment only provides the ability to attach files; which files are attached to which emails is decided by the module that uses it.

Installation

Install the module with Composer in your Magento root directory:

composer require infrangible/m2-mail-attachment

Then enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.