Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdnagency/magento-email-attachment
This module Open-source module allow the administrator to attach Invoice, Shipment, Credit Memo and Custom PDF Files to sales email notification.
https://github.com/mdnagency/magento-email-attachment
magento2 magento2-extension magento2-extension-free magento2-module magento2-module-free
Last synced: about 2 months ago
JSON representation
This module Open-source module allow the administrator to attach Invoice, Shipment, Credit Memo and Custom PDF Files to sales email notification.
- Host: GitHub
- URL: https://github.com/mdnagency/magento-email-attachment
- Owner: MdnAgency
- License: osl-3.0
- Created: 2023-02-03T14:55:11.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T09:37:41.000Z (almost 2 years ago)
- Last Synced: 2024-03-26T22:32:11.521Z (9 months ago)
- Topics: magento2, magento2-extension, magento2-extension-free, magento2-module, magento2-module-free
- Language: PHP
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Magento 2 Email Attachment module
This module Open-source module allow the administrator to attach Invoice, Shipment, Credit Memo and Custom PDF Files to sales email notification.
It has been design to be as simple, expendable and as unobtrusive as possible.It doesn't contain any bloatware just the bare minimum.
# Compatibility
The module has been tested with Magento 2.4.5, it should work with any 2.4.* magento installation.
# Installation
To install the Magento 2 GTM Cookie consent, simply run the command below:
```bash
composer require maisondunet/module-email-attachment
```To enable the module:
```bash
bin/magento module:enable Maisondunet_EmailAttachment
```# Module configuration
Module configuration is located at :
Stores > Configuration > Sales > Sales Emails
## Invoice Options
| Field | Description |
|-------------------------------------|------------------------------------------------------|
| Attach PDF Invoice | Attach a PDF invoice to invoice notification e-mails |## Shipment Options
| Field | Description |
|-------------------------------------|--------------------------------------------------------|
| Attach PDF Invoice | Attach a PDF Shipment to shipment notification e-mails |## Credit Memo Options
| Field | Description |
|------------------------|--------------------------------------------------------------|
| Attach PDF Credit Memo | Attach a PDF Credit Memo to credit_memo notification e-mails |## Email Attachments Options
This functionality allow the administrator to attach custom Files to sales-emails.
| Name | Templates | File |
|-----------------|------------------------------------------------------|-------------------|
| Attachment Name | The file will be attached to selected template email | The file attached |## Extensibility
Create a class to handle you custom attachment
```php
class CreditMemo implements AttachmentResolverInterface
{
// --------
/**
* @param Template $template
* @return MimePartInterface[]
*/
public function getAttachments(Template $template): array{
// Build your custom attachment there
}
}
```And register to service inside a di.xml
```xml
Maisondunet\EmailAttachment\Model\AttachmentResolver\SystemConfiguration
```