You are here

function maillog_uninstall in Maillog / Mail Developer 8

Same name and namespace in other branches
  1. 6 maillog.install \maillog_uninstall()
  2. 7 maillog.install \maillog_uninstall()

Implements hook_uninstall().

File

./maillog.install, line 22
Provides the installation and update routines for the Maillog module.

Code

function maillog_uninstall() {
  $config = \Drupal::configFactory()
    ->getEditable('system.mail');

  // Restore the mail configuration to the default "php_mail" if it currently
  // uses Maillog.
  if ($config
    ->get('interface.default') == 'maillog') {
    $config
      ->set('interface.default', 'php_mail');
    $config
      ->save();
  }
}