It seems that you need to launch your task in a different way.
If we take a look at how doctrine handle this case with the doctrine:build
task. It does that:
if (self::BUILD_MODEL == (self::BUILD_MODEL & $mode))
{
$task = new sfDoctrineBuildModelTask($this->dispatcher, $this->formatter);
$task->setCommandApplication($this->commandApplication);
$task->setConfiguration($this->configuration);
$ret = $task->run();
if ($ret)
{
return $ret;
}
}
This is launched when you type:
php symfony doctrine:build --model
This means, your sendMailBaseTask
shouldn't use runTask
but something like that:
$task = new sendMailConfirmationTask($this->dispatcher, $this->formatter);
$task->setCommandApplication($this->commandApplication);
$task->setConfiguration($this->configuration);
$ret = $task->run(array(), $options);