Mail Transport Builder Attachment for Magento 2
aimanecouissi/module-mail-transport-builder-attachment
Extends Magento's mail transport builder with email attachment support, providing an attachment-capable interface for adding raw content or file-based attachments to messages before they are sent.
Build Tests
Code Quality
Tested on Magento 2.4.9
Recent Test History
Each release is tested against the latest Magento version at that time.
Top Contributors
View LeaderboardLooking for Contributors
Dependency injection compilation fails. Your contribution could help the entire Magento community!
Share This Module's Status
README
Loaded from GitHubAimaneCouissi_MailTransportBuilderAttachment
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
This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.