{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/swiftmailer-bundle/issues/127","labels_url":"https://api.github.com/repos/symfony/swiftmailer-bundle/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/symfony/swiftmailer-bundle/issues/127/comments","events_url":"https://api.github.com/repos/symfony/swiftmailer-bundle/issues/127/events","html_url":"https://github.com/symfony/swiftmailer-bundle/issues/127","id":124249245,"number":127,"title":"Emails not sending from commands using memory spooling","user":{"login":"mbates","id":541844,"avatar_url":"https://avatars.githubusercontent.com/u/541844?v=3","gravatar_id":"","url":"https://api.github.com/users/mbates","html_url":"https://github.com/mbates","followers_url":"https://api.github.com/users/mbates/followers","following_url":"https://api.github.com/users/mbates/following{/other_user}","gists_url":"https://api.github.com/users/mbates/gists{/gist_id}","starred_url":"https://api.github.com/users/mbates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbates/subscriptions","organizations_url":"https://api.github.com/users/mbates/orgs","repos_url":"https://api.github.com/users/mbates/repos","events_url":"https://api.github.com/users/mbates/events{/privacy}","received_events_url":"https://api.github.com/users/mbates/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-29T18:19:31Z","updated_at":"2016-01-22T10:05:40Z","closed_at":null,"body":"I'm using Symfony 2.7.3 and Swiftmailer 5.4.1 and according to the documentation (and from PR #64) these versions should automatically handle emails when memory spooling is used.\r\n\r\nEmails are sending okay in controllers, so the config is setup correctly.\r\n\r\nI've tried sending with the standard email code\r\n\r\n```\r\n$container = $this->getContainer();\r\n$mailer = $container->get('mailer');\r\n\r\n...\r\n\r\n$email = \\Swift_Message::newInstance()\r\n    ->setSubject('New Email')\r\n    ->setFrom('noreply@mydomain.com')\r\n    ->setTo($recipients)\r\n    ->setBody($message);\r\n$mailer->send($email);\r\n```\r\n\r\nI also tried with the manual flush code at the end of the command\r\n\r\n```\r\n$spool = $mailer->getTransport()->getSpool();\r\n$transport = $container->get('swiftmailer.transport.real');\r\n$spool->flushQueue($transport);\r\n```\r\n\r\nNeither of these worked. (I've also checked that $recipients and $message are valid)"},"comment":{"url":"https://api.github.com/repos/symfony/swiftmailer-bundle/issues/comments/173867477","html_url":"https://github.com/symfony/swiftmailer-bundle/issues/127#issuecomment-173867477","issue_url":"https://api.github.com/repos/symfony/swiftmailer-bundle/issues/127","id":173867477,"user":{"login":"jsor","id":55574,"avatar_url":"https://avatars.githubusercontent.com/u/55574?v=3","gravatar_id":"","url":"https://api.github.com/users/jsor","html_url":"https://github.com/jsor","followers_url":"https://api.github.com/users/jsor/followers","following_url":"https://api.github.com/users/jsor/following{/other_user}","gists_url":"https://api.github.com/users/jsor/gists{/gist_id}","starred_url":"https://api.github.com/users/jsor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsor/subscriptions","organizations_url":"https://api.github.com/users/jsor/orgs","repos_url":"https://api.github.com/users/jsor/repos","events_url":"https://api.github.com/users/jsor/events{/privacy}","received_events_url":"https://api.github.com/users/jsor/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T10:05:40Z","updated_at":"2016-01-22T10:05:40Z","body":"Im experiencing the same bug. The bug was introduced in v2.3.10, v2.3.9 works. So my guessing is, that it has something to do with #121."}}