diff --git a/smtp.links.menu.yml b/smtp.links.menu.yml
new file mode 100644
index 0000000..ae71447
--- /dev/null
+++ b/smtp.links.menu.yml
@@ -0,0 +1,5 @@
+smtp.config:
+  title: 'SMTP Authentication Configuration'
+  parent: system.admin_config_system
+  description: 'SMTP Authentication Module setup'
+  route_name: smtp.config
diff --git a/smtp.services.yml b/smtp.services.yml
new file mode 100644
index 0000000..ce2d373
--- /dev/null
+++ b/smtp.services.yml
@@ -0,0 +1,6 @@
+services:
+  smtp.overrider:
+    class: Drupal\smtp\SMTPConfigOverrides
+    arguments: ['@config.factory']
+    tags:
+      - {name: config.factory.override, priority: 5}
diff --git a/src/Form/SMTPConfigForm.php b/src/Form/SMTPConfigForm.php
index e0100a2..4c33420 100644
--- a/src/Form/SMTPConfigForm.php
+++ b/src/Form/SMTPConfigForm.php
@@ -9,6 +9,7 @@
 
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\smtp\Plugin\Mail\SMTPMailSystem;
 
 /**
  * Implements the SMTP admin settings form.
@@ -29,10 +30,10 @@ public function buildForm(array $form, FormStateInterface $form_state) {
     $config = $this->configFactory->getEditable('smtp.settings');
 
     if ($config->get('smtp_on')) {
-      drupal_set_message(t('SMTP.module is active.'));
+      drupal_set_message(t('SMTP module is active.'));
     }
     else {
-      drupal_set_message(t('SMTP.module is INACTIVE.'));
+      drupal_set_message(t('SMTP module is INACTIVE.'));
     }
 
     $form['onoff'] = array(
@@ -126,30 +127,16 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#type' => 'textfield',
       '#title' => t('E-mail from name'),
       '#default_value' => $config->get('smtp_fromname'),
-      '#description' => t('The name that all e-mails will be from. If left blank will use the site name of:') . ' ' . $config->get('site_name', 'Drupal powered site'),
+      '#description' => t('The name that all e-mails will be from. If left blank will use a default of: !name',
+          ['!name' => $this->configFactory->get('system.site')->get('name')]),
     );
     $form['email_options']['smtp_allowhtml'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Allow to send e-mails formated as Html'),
+      '#title' => t('Allow to send e-mails formated as HTML'),
       '#default_value' => $config->get('smtp_allowhtml'),
-      '#description' => t('Checking this box will allow Html formated e-mails to be sent with the SMTP protocol.'),
+      '#description' => t('Checking this box will allow HTML formatted e-mails to be sent with the SMTP protocol.'),
     );
 
-    // If an address was given, send a test e-mail message.
-    $test_address = $config->get('smtp_test_address');
-    if ($test_address != '') {
-      $options = array(
-        '@email' => $test_address,
-        '!check' => '/admin/reports/dblog',
-      );
-      // Clear the variable so only one message is sent.
-      $config->clear('smtp_test_address');
-      global $language;
-      $params['subject'] = t('Drupal SMTP test e-mail');
-      $params['body'] = array(t('If you receive this message it means your site is capable of using SMTP to send e-mail.'));
-      //drupal_mail('smtp', 'smtp-test', $test_address, $language, $params);
-      drupal_set_message(t('A test e-mail has been sent to @email. You may want to !check for any error messages.', $options));
-    }
     $form['email_test'] = array(
       '#type' => 'fieldset',
       '#title' => t('Send test e-mail'),
@@ -168,9 +155,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#description' => t('Checking this box will print SMTP messages from the server for every e-mail that is sent.'),
     );
 
-    // Saving SMTP config vars.
-    $config->save();
-
     return parent::buildForm($form, $form_state);
   }
 
@@ -178,28 +162,32 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    * {@inheritdoc}
    */
   public function validateForm(array &$form, FormStateInterface $form_state) {
-	$values = $form_state->getValues();
+    $values = $form_state->getValues();
 
     if ($values['smtp_on'] == 1 && $values['smtp_host'] == '') {
-      \Drupal::formBuilder()->setErrorByName('smtp_host', $form_state, t('You must enter an SMTP server address.'));
+      $form_state->setErrorByName('smtp_host', $this->t('You must enter an SMTP server address.'));
     }
 
     if ($values['smtp_on'] == 1 && $values['smtp_port'] == '') {
-      \Drupal::formBuilder()->setErrorByName('smtp_port', $form_state, t('You must enter an SMTP port number.'));
+      $form_state->setErrorByName('smtp_port', $this->t('You must enter an SMTP port number.'));
     }
 
     if ($values['smtp_from'] && !valid_email_address($values['smtp_from'])) {
-      \Drupal::formBuilder()->setErrorByName('smtp_from', $form_state, t('The provided from e-mail address is not valid.'));
+      $form_state->setErrorByName('smtp_from', $this->t('The provided from e-mail address is not valid.'));
+    }
+
+    if ($values['smtp_test_address'] && !valid_email_address($values['smtp_test_address'])) {
+      $form_state->setErrorByName('smtp_test_address', $this->t('The provided test e-mail address is not valid.'));
     }
 
     // If username is set empty, we must set both username/password empty as well.
     if (empty($values['smtp_username'])) {
       $values['smtp_password'] = '';
     }
-    // A little hack. When form is presentend, the password is not shown (Drupal way of doing).
+    // A little hack. When form is presented, the password is not shown (Drupal way of doing).
     // So, if user submits the form without changing the password, we must prevent it from being reset.
     elseif (empty($values['smtp_password'])) {
-      unset($values['smtp_password']);
+      $form_state->unsetValue('smtp_password');
     }
   }
 
@@ -207,34 +195,10 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-	$values = $form_state->getValues();
+    $values = $form_state->getValues();
     $config = $this->configFactory->getEditable('smtp.settings');
-
-    if ($config->get('smtp_on') != $values['smtp_on']) {
-      // Turn on SMTP mail system.
-      if ($values['smtp_on']) {
-        // Get default settings.
-        $mail_config = $this->configFactory->getEditable('system.mail');
-        $mail_system = $mail_config->get('interface');
-        if (empty($mail_systems)) {
-          $mail_system = array('default' => 'Drupal\Core\Mail\PhpMail');
-        }
-
-        // Store default settings.
-        $config->set('prev_mail_system', $mail_system);
-
-        // Set SMTP as default mail system.
-        $mail_system['default'] = 'SMTPMailSystem';
-        $mail_config->set('interface', $mail_system)->save();
-      }
-      // Turn off SMTP mail system and restore the previous one.
-      else {
-        $config->set('prev_mail_system', array('default' => 'Drupal\Core\Mail\PhpMail'))->save();
-        \Drupal::config('system.mail')
-          ->set('interface', $config->get('prev_mail_system'))
-          ->save();
-      }
-    }
+    $mail_config = $this->configFactory->getEditable('system.mail');
+    $mail_system = $mail_config->get('interface');
 
     // Updating config vars.
     if (isset($values['smtp_password'])) {
@@ -249,12 +213,35 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
       ->set('smtp_from', $values['smtp_from'])
       ->set('smtp_fromname', $values['smtp_fromname'])
       ->set('smtp_allowhtml', $values['smtp_allowhtml'])
-      ->set('smtp_test_address', $values['smtp_test_address'])
       ->set('smtp_debugging', $values['smtp_debugging'])
       ->save();
 
+    // If an address was given, send a test e-mail message.
+    if ($test_address = $values['smtp_test_address']) {
+      $params['subject'] = t('Drupal SMTP test e-mail');
+      $params['body'] = array(t('If you receive this message it means your site is capable of using SMTP to send e-mail.'));
+      $account = \Drupal::currentUser();
+      // If module is off, send the test message with SMTP by temporarily overriding.
+      if (!$config->get('smtp_on')) {
+        $original = $mail_config->get('interface');
+        $mail_system['default'] = 'SMTPMailSystem';
+        $mail_config->set('interface', $mail_system)->save();
+      }
+      \Drupal::service('plugin.manager.mail')->mail('smtp', 'smtp-test', $test_address, $account->getPreferredLangcode(), $params);
+      if (!$config->get('smtp_on')) {
+        $mail_config->set('interface', $original)->save();
+      }
+      drupal_set_message(t('A test e-mail has been sent to @email via SMTP. You may want to check the log for any error messages.', ['@email' => $test_address]));
+    }
+
     parent::submitForm($form, $form_state);
   }
 
-  public function getEditableConfigNames(){}
+  /**
+   * {@inheritdoc}
+   *
+   * @todo - Flesh this out.
+   */
+  public function getEditableConfigNames() {}
+
 }
diff --git a/src/Plugin/Mail/SMTPMailSystem.php b/src/Plugin/Mail/SMTPMailSystem.php
index d171e25..33ccd64 100644
--- a/src/Plugin/Mail/SMTPMailSystem.php
+++ b/src/Plugin/Mail/SMTPMailSystem.php
@@ -17,7 +17,7 @@
  * @Mail(
  *   id = "SMTPMailSystem",
  *   label = @Translation("SMTP Mailer"),
- *   description = @Translation("Sends the message as plain text, using SMTP.")
+ *   description = @Translation("Sends the message, using SMTP.")
  * )
  */
 class SMTPMailSystem implements MailInterface {
@@ -84,7 +84,7 @@ public function mail(array $message) {
     $from_name = $this->smtpConfig->get('smtp_fromname');
     if (empty($from_name)) {
       // If value is not defined in settings, use site_name.
-      $from_name = $this->smtpConfig->get('site_name');
+      $from_name = \Drupal::config('system.site')->get('name');
     }
 
     //Hack to fix reply-to issue.
diff --git a/src/SMTPConfigOverrides.php b/src/SMTPConfigOverrides.php
new file mode 100644
index 0000000..751ec3c
--- /dev/null
+++ b/src/SMTPConfigOverrides.php
@@ -0,0 +1,69 @@
+<?php
+/**
+ * @file
+ * Contains \Drupal\smtp\SMTPConfigOverrides
+ */
+
+namespace Drupal\smtp;
+use Drupal\Core\Cache\CacheableMetadata;
+use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\Config\ConfigFactoryOverrideInterface;
+use Drupal\Core\Config\StorageInterface;
+use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+ * Mail system configuration override
+ */
+class SMTPConfigOverrides implements ConfigFactoryOverrideInterface, ContainerInjectionInterface {
+
+  protected $configFactory;
+  protected $on;
+
+  /**
+   * @inheritDoc
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('config.factory')
+    );
+  }
+
+  function __construct(ConfigFactoryInterface $factory) {
+    $this->configFactory = $factory;
+    $this->on = $this->configFactory->get('smtp.settings')->get('smtp_on');
+  }
+
+  /**
+   * @inheritDoc
+   */
+  public function loadOverrides($names) {
+    $overrides = [];
+    if (in_array('system.mail', $names) && $this->on) {
+      $overrides['system.mail']['interface']['default'] = 'SMTPMailSystem';
+    }
+    return $overrides;
+  }
+
+  /**
+   * @inheritDoc
+   */
+  public function getCacheSuffix() {
+    return 'SMTPMailOverride';
+  }
+
+  /**
+   * @inheritDoc
+   */
+  public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
+    return NULL;
+  }
+
+  /**
+   * @inheritDoc
+   */
+  public function getCacheableMetadata($name) {
+    return new CacheableMetadata();
+  }
+
+}
