So I am working on Symfony 1.4 and I am looking for a way to programmatically set a different delivery_strategy than what I have in my factories.yml.
My code for initialising the mailer and the transport is as below:
$transport = Swift_SmtpTransport::newInstance('MY SMTP SERVER');
$transport->setUsername($api_user);
$transport->setPassword($api_key);
$swift = Swift_Mailer::newInstance($transport);
$response = $swift->send($message);
For example in my factories.yml I have the strategy set to spool but here I want to set it to realtime.
Any way of doing this programmatically?