function mailgun_install in Mailgun 8
Implements hook_install().
File
- ./
mailgun.install, line 15 - Contains install/uninstall stuff.
Code
function mailgun_install() {
$config = \Drupal::configFactory()
->getEditable('system.mail');
$mail_plugins = $config
->get('interface');
if (in_array('mailgun', array_keys($mail_plugins))) {
return;
}
$mail_plugins['mailgun'] = 'mailgun';
$config
->set('interface', $mail_plugins)
->save();
}