protected function validateEmailer()
    {
        if ($this->emailer === null) {
            $settingsInstance = $this->getSettingsInstance();

            $writerClasses = $settingsInstance->getDefaultEmailWriterClasses();
            $emailerClass = $settingsInstance->getDefaultEmailerClass();

            $writerInstances = [];
            foreach ($writerClasses as $writerClass) {
                $writerInstances[] = new $writerClass();
            }

            $this->emailer = new $emailerClass($writerInstances);
        }
    }