Recent articles

Install and use Swift Mailer in Drupal 8 (part 2 : implementation)

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.

 

1) Configure Swift Mailer

 

In Swift Mailer configuration (/admin/config/swiftmailer/transport) , we select the following options:

Transport:

Install and use Swift Mailer in Drupal 8 (part 1 : dependency)

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.

 

1) Composer

 

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.

Send HTML mails with Drupal 8

At the time of this article in October 2015, the HTML swiftmailer module version for Drupal 8 was not released. Thus the below solution is not relevant anymore but may help for configuration or setup. We also have a new post about installation of swiftmailer

Here is a possible solution for sending HTML mails with Drupal 8 specifically when creating custom modules.

The solution below uses Swiftmailer library.

The main module compatible with Drupal 8 can be downloaded here.

This version needs some corrections if it is used with a recent Drupal 8 release. In this case, these are the lines changed:

Usage of ClamAV in Drupal 8

This is an example of anti-virus implementation with an Ubuntu server.

Our back office management solution allows users to upload files in various sections of the application for storage or file sharing. For this reason, checking of files for virus is an important advantage.

We use the ClamAV module integration from Drupal 8.

 

1) Install ClamAV on Ubuntu

Installation on Ubuntu server is straight forward.  However, it is better to install with clamav-daemon clamav-freshclam options for later settings