PHP code example of maisondunet / module-email-attachment

1. Go to this page and download the library: Download maisondunet/module-email-attachment library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maisondunet / module-email-attachment example snippets


class CreditMemo implements AttachmentResolverInterface
{
    // --------
    
    /**
    * @param Template $template
    * @return MimePartInterface[]
     */
    public function getAttachments(Template $template): array{
        // Build your custom attachment there
    }
}