You are here

public function WebformEmailProvider::uninstall in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformEmailProvider.php \Drupal\webform\WebformEmailProvider::uninstall()

Uninstall webform's PHP mail handler which supports sending HTML emails.

Overrides WebformEmailProviderInterface::uninstall

1 call to WebformEmailProvider::uninstall()
WebformEmailProvider::check in src/WebformEmailProvider.php
Check if the Webform module should provide support for sending HTML emails.

File

src/WebformEmailProvider.php, line 114

Class

WebformEmailProvider
Manages and provides HTML email support.

Namespace

Drupal\webform

Code

public function uninstall() {
  $config = $this->configFactory
    ->getEditable('system.mail');
  $mail_plugins = $config
    ->get('interface');
  if (isset($mail_plugins['webform'])) {
    unset($mail_plugins['webform']);
    $config
      ->set('interface', $mail_plugins)
      ->save();
  }
}