public function setSpoolDirectory($dir)
    {
        if (!DirectoryHelper::ensureExists($dir)) {
            throw new \Exception(
                sprintf('Can not create emails spooling directory "%s"!', $dir)
            );
        }
        $this->spool_dir = $dir;
        return $this;
    }