I'm trying to send mails via task, that i would like to run per batch. In the task-execute()-function, i tried the follwing:
$mailer = $this->getMailer();
$message = $mailer->compose()
(i also tried many other versions e.g. with sfContext::getInstance()->getMailer(), but then i got "the default context does not exist)
In factories.yml, I added the following:
host: mycustom.smtp.com //of course, i set the data of my provider
username: myusername //of course, i set the data of my provider
password: mypassword //of course, i set the data of my provider
But on the command-line, after running my task, i always got "Connection could not be established with localhost"
This is confusing, because in the factory.yml i told the mailer to use MY settings, haven't I ??
Of course i cleared cache etc. and i read different examples and tutorials but still i don't got it
Could someone help me?