Swiftmailer module installation fails although the swiftmailer external library is installed I am trying to install the Swiftmailer module on Drupal 8, but I get the following error.


  Swift Mailer requires the external Swift Mailer library. The recommended way of solving this dependency is using the Composer Manager module.


The steps I took are the following.


I installed the Libraries and Mail System modules
I installed the Swiftmailer external library, by running composer require swiftmailer/swiftmailer:"~5.4.5" from sites/all/libraries (inside the Drupal root directory)
I uploaded and uncompressed swiftmailer-8.x-1.0-beta2.tar.gz at $DRUPAL_ROOT/modules/. The installation seemed to be successful, afterwards I got a vendor/swiftmailer/swiftmailer directory under sites/all/libraries.
I tried to install the Swiftmailer module with drush en swiftmailer and through the admin UI.


I have also tried the second step from other locations (for example $DRUPAL_ROOT/libraries), with the same result. Note that the Composer Manager module seems to be obsolete and not needed, according to latest information found in Drupal forums/sites.

How do I install the Swiftmailer module?
That's 7.x/outdated information unfortunately.

You should use composer to manage your Drupal 8 site, using the drupal-project starting point: https://github.com/drupal-composer/drupal-project. It will be a bit of work to switch an existing site to that but after that, installing swiftmailer including all its dependencies will be as easy as running composer require drupal/swiftmailer. That will automatically include all dependencies.