diff --git a/src/Form/MessagesForm.php b/src/Form/MessagesForm.php
index fba3354..0f19b94 100644
--- a/src/Form/MessagesForm.php
+++ b/src/Form/MessagesForm.php
@@ -4,6 +4,7 @@ namespace Drupal\swiftmailer\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Link;
 use Drupal\Core\Url;
 
 class MessagesForm extends ConfigFormBase {
@@ -71,7 +72,7 @@ class MessagesForm extends ConfigFormBase {
       '#type' => 'checkbox',
       '#title' => t('Generate alternative plain text version.'),
       '#default_value' => $config->get('convert_mode', SWIFTMAILER_VARIABLE_CONVERT_MODE_DEFAULT),
-      '#description' => t('Please refer to @link for more details about how the alternative plain text version will be generated.', array('@link' => \Drupal::l('html2text', Url::fromUri('http://www.chuggnutt.com/html2text')))),
+      '#description' => t('Please refer to @link for more details about how the alternative plain text version will be generated.', array('@link' => Link::fromTextAndUrl('html2text', Url::fromUri('http://www.chuggnutt.com/html2text')))),
     );
 
     $form['character_set'] = array(
diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php
index 0c96b87..61e59b7 100644
--- a/src/Form/SettingsForm.php
+++ b/src/Form/SettingsForm.php
@@ -4,6 +4,7 @@ namespace Drupal\swiftmailer\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Link;
 use Drupal\Core\Url;
 
 /**
@@ -65,7 +66,7 @@ class SettingsForm extends ConfigFormBase {
         'method' => 'replace',
         'effect' => 'fade',
       ),
-      '#description' => t('Not sure which transport type to choose? The @documentation gives you a good overview of the various transport types.', array('@documentation' => \Drupal::l($this->t('Swift Mailer documentation'), Url::fromUri('http://swiftmailer.org/docs/sending.html#transport-types')))),
+      '#description' => t('Not sure which transport type to choose? The @documentation gives you a good overview of the various transport types.', array('@documentation' => Link::fromTextAndUrl($this->t('Swift Mailer documentation'), Url::fromUri('http://swiftmailer.org/docs/sending.html#transport-types')))),
     );
 
     /*
@@ -97,7 +98,7 @@ class SettingsForm extends ConfigFormBase {
       server of your choice. You need to specify which SMTP server
       to use. Please refer to the @documentation for more details
       about this transport type.',
-          array('@documentation' => \Drupal::l($this->t('Swift Mailer documentation'), Url::fromUri('http://swiftmailer.org/docs/sending.html#the-smtp-transport')))) . '</p>',
+          array('@documentation' => Link::fromTextAndUrl($this->t('Swift Mailer documentation'), Url::fromUri('http://swiftmailer.org/docs/sending.html#the-smtp-transport')))) . '</p>',
     );
 
     $form['transport']['configuration'][SWIFTMAILER_TRANSPORT_SMTP]['server'] = array(
@@ -166,7 +167,7 @@ class SettingsForm extends ConfigFormBase {
       MTA. If you do not provide any path then Swift Mailer
       defaults to /usr/sbin/sendmail. You can read more about
       this transport type in the @documentation.',
-          array('@documentation' => \Drupal::l($this->t('Swift Mailer documentation'), Url::fromUri('http://swiftmailer.org/docs/sending.html#the-sendmail-transport')))) . '</p>',
+          array('@documentation' => Link::fromTextAndUrl($this->t('Swift Mailer documentation'), Url::fromUri('http://swiftmailer.org/docs/sending.html#the-sendmail-transport')))) . '</p>',
     );
 
     $form['transport']['configuration'][SWIFTMAILER_TRANSPORT_SENDMAIL]['path'] = array(
@@ -180,7 +181,7 @@ class SettingsForm extends ConfigFormBase {
       '#type' => 'radios',
       '#title' => t('Mode'),
       '#options' => array('bs' => 'bs', 't' => 't '),
-      '#description' => t('Not sure which option to choose? Go with <em>bs</em>. You can read more about the above two modes in the @documentation.', array('@documentation' => \Drupal::l($this->t('Swift Mailer documentation'), Url::fromUri('http://swiftmailer.org/docs/sendmail-transport')))),
+      '#description' => t('Not sure which option to choose? Go with <em>bs</em>. You can read more about the above two modes in the @documentation.', array('@documentation' => Link::fromTextAndUrl($this->t('Swift Mailer documentation'), Url::fromUri('http://swiftmailer.org/docs/sendmail-transport')))),
       '#default_value' => $config->get('sendmail_mode'),
     );
 
@@ -199,7 +200,7 @@ class SettingsForm extends ConfigFormBase {
       configured here. Please refer to the @documentation if you
       would like to read more about how the built-in mail functionality
       in PHP can be configured.',
-          array('@documentation' => \Drupal::l($this->t('PHP documentation'), Url::fromUri('http://www.php.net/manual/en/mail.configuration.php')))) . '</p>',
+          array('@documentation' => Link::fromTextAndUrl($this->t('PHP documentation'), Url::fromUri('http://www.php.net/manual/en/mail.configuration.php')))) . '</p>',
     );
 
     $form['transport']['configuration'][SWIFTMAILER_TRANSPORT_SPOOL] = array(
diff --git a/src/Plugin/Mail/SwiftMailer.php b/src/Plugin/Mail/SwiftMailer.php
index a017afb..041a123 100644
--- a/src/Plugin/Mail/SwiftMailer.php
+++ b/src/Plugin/Mail/SwiftMailer.php
@@ -118,7 +118,7 @@ class SwiftMailer implements MailInterface, ContainerFactoryPluginInterface {
 
       if ($this->config['message']['convert_mode'] || !empty($message['params']['convert'])) {
         $converter = new Html2Text($message['body']);
-        $message['plain'] = $converter->get_text();
+        $message['plain'] = $converter->getText();
       }
     }
 
diff --git a/src/Utility/Conversion.php b/src/Utility/Conversion.php
index 98db31f..1a67291 100644
--- a/src/Utility/Conversion.php
+++ b/src/Utility/Conversion.php
@@ -262,7 +262,7 @@ class Conversion {
    *   TRUE if the provided header is an id header, and otherwise FALSE.
    */
   public static function swiftmailer_is_id_header($key, $value) {
-    if (valid_email_address($value) && $key == 'Message-ID') {
+    if (\Drupal::service('email.validator')->isValid($value) && $key == 'Message-ID') {
       return TRUE;
     }
     else {
@@ -308,7 +308,7 @@ class Conversion {
    *   TRUE if the provided header is a path header, and otherwise FALSE.
    */
   public static function swiftmailer_is_path_header($key, $value) {
-    if (valid_email_address($value) && $key == 'Return-Path') {
+    if (\Drupal::service('email.validator')->isValid($value) && $key == 'Return-Path') {
       return TRUE;
     }
     else {
