In this article, we will see how we built custom blocks in EK management tools suite with a sample basic block in a module called 'mymodule' used for demo. It can be used to display multiple content, static or dynamic as in the example above.
First we will create a script that will display some content within a block. the script file will be called MyBlock.php and is placed in /mymodule/src/Plugin/Block/.
In previous article we explained how we installed the Swift Mailer module and its dependencies.
In this second part, let's see how we configure and implement it to use in our modules to send formated HTML mail with attachment.
First you will need to have Mail system module installed already. There is no particular issue or difficulty here.
In Swift Mailer configuration (/admin/config/swiftmailer/transport) , we select the following options:
In a previous post from 2015, we described usage of Swift Mailer module to send HTML mail and mail with attachment. At this time, the module was not yet available for Drupal 8.
There is now a version alpha1 available. Let's go through installation process.
Because it has been rather tedious for us, we will try to explain the flow of the process as much as possible to help you save time.
The prerequisite is the installation of composer.
In our case we installed first on Windows inside a folder named F:\Program Files\composer2\.
The installation exe for Windows can be found here.