Sending mails with attachments in Magento 2
This blog post was published more than one year ago and might be outdated!
· One min read
The Magento 2 Transport Builder, responsible for preparing a mail message, wraps the mail component of the Zend Framework. Unfortunatly it is missing a method to add attachments. I submitted a Pull Request to Magento 2 to fix the issue but for now we need a work-a-round in our project. First we extend the Magento 2 Transport Builder like this: