I am using Magento version 2.2.6 and trying to send custom email with attachment, but I am getting 500 error. I tried transportbuilder addattachment which is working in Magento 2.3.x and onwards. But facing issue in this version.

I am trying this code:


And getting this error [1]: https://i.stack.imgur.com/civfS.png

Kindly let me know how I can send email with attachment in Magento version 2.2.6.

Any help will be apperciated.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.