public function WebformEmailProvider::install in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformEmailProvider.php \Drupal\webform\WebformEmailProvider::install()
Install webform's PHP mail handler which supports sending HTML emails.
Overrides WebformEmailProviderInterface::install
1 call to WebformEmailProvider::install()
- WebformEmailProvider::check in src/
WebformEmailProvider.php - Check if the Webform module should provide support for sending HTML emails.
File
- src/
WebformEmailProvider.php, line 102
Class
- WebformEmailProvider
- Manages and provides HTML email support.
Namespace
Drupal\webformCode
public function install() {
$config = $this->configFactory
->getEditable('system.mail');
$mail_plugins = $config
->get('interface');
if (!isset($mail_plugins['webform']) || $mail_plugins['webform'] !== 'webform_php_mail') {
$mail_plugins['webform'] = 'webform_php_mail';
$config
->set('interface', $mail_plugins)
->save();
}
}