aimanecouissi/module-mail-transport-builder-attachment

Add attachments to Magento mail transport

Maintainers

Package info

github.com/aimanecouissi/magento2-module-mail-transport-builder-attachment

Type:magento2-module

pkg:composer/aimanecouissi/module-mail-transport-builder-attachment

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.0.0 2026-04-30 21:33 UTC

This package is auto-updated.

Last update: 2026-04-30 21:33:20 UTC


README

Latest Stable Version Total Downloads Magento Version License PHP Version Require

Extends Magento's mail transport builder with email attachment support. The module provides an attachment-capable transport builder interface for adding raw content or file-based attachments before a message is sent.

Installation

composer require aimanecouissi/module-mail-transport-builder-attachment
bin/magento module:enable AimaneCouissi_MailTransportBuilderAttachment
bin/magento setup:upgrade
bin/magento cache:flush

Usage

Inject AttachmentTransportBuilderInterface where a Magento mail transport builder is needed. Use addAttachment() for raw content and addAttachmentFromFile() for readable file paths.

Call the attachment methods before getTransport(). Queued attachments are added to the generated MIME message and cleared when the builder resets after transport creation.

Uninstall

bin/magento module:disable AimaneCouissi_MailTransportBuilderAttachment
composer remove aimanecouissi/module-mail-transport-builder-attachment
bin/magento setup:upgrade
bin/magento cache:flush

Changelog

See CHANGELOG for all recent changes.

License

MIT