elcommerce/magento2-advanced-mailer
最新稳定版本:0.0.2
Composer 安装命令:
composer require elcommerce/magento2-advanced-mailer
包简介
Advanced Mailer extension for Magento 2
README 文档
README
What for this extension is designed for?
It's impossible currently to send emails with file attachments from Magento 2 class called:
Magento\Framework\Mail\Template\TransportBuilder
There were some community PRs: magento/magento2#33262
But for some starnge reasons Adobe doesn't accept such useful changes from community members. That's weird.
elcommerce/magento2-advanced-mailer is FREE of:
- PHP
ReflectionAPI usage - big and ugly rewriting of
TransportBuilderwith huge__constructor()overload
Compatibility
- Magento: v2.4.0 and later
- PHP: 7.4+
Installation
install module using composer:
composer require elcommerce/magento2-advanced-mailer
then do:
bin/magento setup:upgrade
bin/magento setup:di:compile
API
There's an override in di.xml, so your TransportBuilder objects will have addAttachment() method now:
public function addAttachment( string $content, string $fileName, ?string $fileType = MimeInterface::TYPE_OCTET_STREAM ): TransportBuilder
As bonus you have addMimePart() method too:
public function addMimePart(object $part): TransportBuilder
Where $part is Magento\Framework\Mail\MimePart or Laminas\Mime\Part instance
统计信息
- 总下载量: 38
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2025-03-06