protected function EmailYamlFormHandler::supportsAttachments in YAML Form 8
Check that emailing files as attachments is supported.
Return value
bool TRUE if emailing files as attachments is supported.
2 calls to EmailYamlFormHandler::supportsAttachments()
- EmailYamlFormHandler::buildConfigurationForm in src/
Plugin/ YamlFormHandler/ EmailYamlFormHandler.php - Form constructor.
- EmailYamlFormHandler::getMessage in src/
Plugin/ YamlFormHandler/ EmailYamlFormHandler.php - Get a fully populated email for a form submission.
File
- src/
Plugin/ YamlFormHandler/ EmailYamlFormHandler.php, line 688
Class
- EmailYamlFormHandler
- Emails a form submission.
Namespace
Drupal\yamlform\Plugin\YamlFormHandlerCode
protected function supportsAttachments() {
// If 'system.mail.interface.default' is 'test_mail_collector' allow
// email attachments during testing.
if (\Drupal::configFactory()
->get('system.mail')
->get('interface.default') == 'test_mail_collector') {
return TRUE;
}
return \Drupal::moduleHandler()
->moduleExists('mailsystem');
}