When you work on a project in Magento 2, the client requires to add an attachment to an email to send to a customer. You don't know how to complete your task, you are searching for a good solution. Today I show you the best codes to complete your task. How to send an email with an attachment in Magento 2.
Please help me to reach 10.000 subscribers by subscribing to my channel and sharing my videos.
So what will we do in this practice?
- We will create a new module called PHPCuong_SalesOrder.
- We will add a new button called "Send a PDF Invoice Email" to the invoice view page on the backend.
- When the administrator clicks on the "Send a PDF Invoice Email" button, the system will send an email with the PDF invoice attachment to the customer.
https://www.youtube.com/watch?v=2TojcPMVNzw&list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ&index=70