Instagram

About Me

Photo Profile
Meetanshi Architecture Designer

Meetanshi is found based on providing the best Magento Extensions and Customized eCommerce Business Solutions perfected to the users’ needs. Our Happy users make us Happy. Complete satisfaction to our clients is what drives and motivates us to work hard. Read More

Sunday, January 1, 2023

How to Programmatically Attach PDF File in Magento 2 Email

For Magento 2 stores, generally, Emails are sent for various purposes such as invoice, billing, coupon codes, etc. that require to attach PDF files. Manually attaching files for these tasks is not feasible. Instead, programmatically attach a PDF file for Magento 2 Email!


Method to Programmatically Attach PDF File in Magento 2 Email:

  1. Create your TransportBuilder class, Vendor/Extension/Model/Mail/TransportBuilder.php

  2. Create sample Email Sending Helper, Vendor/Extension/Helper/Data.php

For the detailed method, visit https://meetanshi.com/blog/programmatically-attach-pdf-file-in-magento-2-email/


No comments:
Write comments


Get more of our update !