diff --git a/includes/helpers/utilities.inc b/includes/helpers/utilities.inc
index 40885a6..ebab0fc 100644
--- a/includes/helpers/utilities.inc
+++ b/includes/helpers/utilities.inc
@@ -5,42 +5,6 @@
  */
 
 /**
- * Validates whether the Swift Mailer library is available at the provided path.
- *
- * @param string $path
- *   The path to the base directory of the Swift Mailer library
- *
- * @return mixed
- *   The provided path exluding leading and trailing slashes if the Swift Mailer
- *   library is available at the provided path, and otherwise FALSE.
- */
-function swiftmailer_validate_library($path) {
-  return TRUE;
-
-  // Remove leading slashes.
-  while (drupal_substr($path, 0, 1) === '/') {
-    $path = drupal_substr($path, 1);
-  }
-
-  // Remove trailing slashes.
-  while (drupal_substr($path, -1) === '/') {
-    $path = drupal_substr($path, 0, -1);
-  }
-
-  // Get the real path of the 'swift_required.php' file.
-  $real_path = DRUPAL_ROOT . '/' . $path . '/lib/swift_required.php';
-
-  // Returns whether the 'swift_required.php' file could be found.
-  if (file_exists($real_path)) {
-    return $path;
-  }
-  else {
-    return FALSE;
-  }
-
-}
-
-/**
  * Returns a list of available encryption options.
  *
  * @return array
diff --git a/src/Form/MessagesForm.php b/src/Form/MessagesForm.php
index b28d4e5..f7b2fd4 100644
--- a/src/Form/MessagesForm.php
+++ b/src/Form/MessagesForm.php
@@ -9,6 +9,7 @@ namespace Drupal\swiftmailer\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\swiftmailer\Plugin\Mail\SwiftMailer;
 use Drupal\Core\Url;
 
 class MessagesForm extends ConfigFormBase {
@@ -37,7 +38,12 @@ class MessagesForm extends ConfigFormBase {
       '#markup' => '<p>' . t('This page allows you to configure settings which determines how e-mail messages are created.') . '</p>',
     );
 
-    if (swiftmailer_validate_library($config->get('path', SWIFTMAILER_VARIABLE_PATH_DEFAULT))) {
+    // Validate that the Swift Mailer library is available. If not, a warning is displayed
+    if (!SwiftMailer::loadLibraries()) {
+        drupal_set_message(t('The Swiftmailer library could not be found. That means that this module will probably not work properly. You can easily solve this problem: navigate to the module directory and execute "composer install". This will download all necessary files'),"warning");
+    }
+    
+   
 
       $form['format'] = array(
         '#type' => 'fieldset',
@@ -94,16 +100,10 @@ class MessagesForm extends ConfigFormBase {
         '#options' => swiftmailer_get_character_set_options(),
         '#default_value' => $config->get('character_set', SWIFTMAILER_VARIABLE_CHARACTER_SET_DEFAULT),
       );
-    }
-    else {
+    
+    
 
-      $form['message'] = array(
-        '#markup' => '<p>' . t('You need to configure the location of the Swift Mailer library. Please visit the !page
-          and configure the library to enable the configuration options on this page.',
-          array('!page' => _l(t('library configuration page'), 'admin/config/people/swiftmailer'))) . '</p>',
-      );
-
-    }
+    
 
     return $form;
   }
diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php
index a003f77..5ea06c8 100644
--- a/src/Form/SettingsForm.php
+++ b/src/Form/SettingsForm.php
@@ -8,6 +8,7 @@
 namespace Drupal\swiftmailer\Form;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\swiftmailer\Plugin\Mail\SwiftMailer;
 use Drupal\Core\Url;
 
 /**
@@ -40,10 +41,12 @@ class SettingsForm extends ConfigFormBase {
       '#markup' => '<p>' . t('This page allows you to configure settings which determines how e-mail messages are sent.') . '</p>',
     );
 
-    // Validate that the Swift Mailer library is available. Configuration options
-    // should only be displayed if the library is available.
-    if (swiftmailer_validate_library($config->get('path', SWIFTMAILER_VARIABLE_PATH_DEFAULT))) {
-
+    // Validate that the Swift Mailer library is available. If not, a warning is displayed
+    if (!SwiftMailer::loadLibraries()) {
+        drupal_set_message(t('The Swiftmailer library could not be found. That means that this module will probably not work properly. You can easily solve this problem: navigate to the module directory and execute "composer install". This will download all necessary files'),"warning");
+    }
+    
+    
       $form['transport'] = array(
         '#id' => 'transport',
         '#type' => 'details',
@@ -231,16 +234,7 @@ class SettingsForm extends ConfigFormBase {
         '#description' => t('The absolute path to the spool directory.'),
         '#default_value' => $config->get('spool_directory', sys_get_temp_dir() . '/swiftmailer-spool'),
       );
-    }
-    else {
-
-      $form['message'] = array(
-        '#markup' => t('<p>You need to configure the location of the Swift Mailer library. Please visit the !page
-        and configure the library to enable the configuration options on this page.</p>',
-          array('!page' => \Drupal::l($this->t('library configuration page'), 'admin/config/people/swiftmailer'))),
-      );
 
-    }
 
     return $form;
   }
diff --git a/src/Plugin/Mail/SwiftMailer.php b/src/Plugin/Mail/SwiftMailer.php
index e53d754..677b524 100644
--- a/src/Plugin/Mail/SwiftMailer.php
+++ b/src/Plugin/Mail/SwiftMailer.php
@@ -92,6 +92,47 @@ class SwiftMailer implements MailInterface, ContainerFactoryPluginInterface {
   }
 
   /**
+   * Loads the Swiftmailer library and the HTML2text library
+   * a boolean is returned to indicate wheter the loading has been successful
+   * 
+   * @return bool
+   *  True if the libraries could be loaded
+   *  False in other cases
+   */
+  public static function loadLibraries()
+  {
+    //Try to load the swiftmailer library
+      
+      $pathToLoader = __DIR__.'/../../../vendor/autoload.php';
+      
+      //First we check if the path exists
+      if(!file_exists($pathToLoader))
+      {
+        //definately not there...
+        return false;
+      }
+      else
+      {
+        //We include the composer-generated autoloader
+        require_once $pathToLoader;
+        
+        //Then we check to make sure the classes are available
+        if(class_exists('Swift_Mailer')){
+          
+          //everything seems ok
+          return true;
+        }      
+        else
+        {
+          
+          //There seems to be a problem
+          return false;
+        }
+      }
+  }
+  
+  
+  /**
    * Formats a message composed by drupal_mail().
    *
    * @see http://api.drupal.org/api/drupal/includes--mail.inc/interface/MailSystemInterface/7
@@ -121,8 +162,21 @@ class SwiftMailer implements MailInterface, ContainerFactoryPluginInterface {
       $message['body'] = $this->renderer->renderRoot($render);
 
       if ($this->config['message']['convert_mode'] || !empty($message['params']['convert'])) {
-        $converter = new Html2Text($message['body']);
-        $message['plain'] = $converter->get_text();
+        
+        //Libraries must be loaded
+        if($this->loadLibraries()){
+          //Libraries were loaded
+          $converter = new Html2Text($message['body']);
+          $message['plain'] = $converter->get_text();
+        }
+        else
+        {
+          //Something went wrong, probably the library is missing
+          $this->logger->error('The format function could not be executed because the HTML2text library could not be loaded. You can easily install this using composer');
+          drupal_set_message(t('An attempt to send an e-mail message failed.'), 'error');
+        }
+        
+        
       }
     }
 
@@ -171,7 +225,12 @@ class SwiftMailer implements MailInterface, ContainerFactoryPluginInterface {
    */
   public function mail(array $message) {
     try {
-
+      
+      if(!$this->loadLibraries())
+      {
+        throw new Exception('The Swiftmailer library could not be found. You can easily install this using composer.');
+      }
+      
       // Create a new message.
       $m = Swift_Message::newInstance();
 
