private function createMailYamlFile($data)
{
$fs = new Filesystem();
$config_file = $this->config_path . '/mail.yml';
if ($fs->exists($config_file)) {
$fs->remove($config_file);
}
$target = array('${MAIL_BACKEND}', '${MAIL_HOST}', '${MAIL_PORT}', '${MAIL_USER}', '${MAIL_PASS}');
$replace = array($data['mail_backend'], $data['smtp_host'], $data['smtp_port'], $data['smtp_username'], $data['smtp_password']);
$fs = new Filesystem();
$content = str_replace($target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist'));
$fs->dumpFile($config_file, $content);
return $this;
}