/** * Instantiate an AbstractMail object. * * @since 1.0.0 * * @param ConfigInterface $config The Config to use. * * @throws FailedToProcessConfigException If the Config could not be processed. */ public function __construct(ConfigInterface $config) { $this->config = $config; $this->setFormat(); $this->viewBuilder = new ViewBuilder($config ? $config->getSubConfig('ViewBuilder') : null); foreach ($this->config->getKey('view_root_locations') as $folder) { $this->viewBuilder->addLocation(new FilesystemLocation($folder)); } }