UserManagerを拡張するサービスがあるので、次のようにします。
$message = \Swift_Message::newInstance()
->setSubject('~')
->setFrom('~')
->setTo('~')
->setBody('~', 'text/html');
$this->get('mailer')->send($message);
エラーが発生します:
Fatal error: Call to undefined method My\MyBundle\Service\ServiceClass::get()
これは、swiftmailerをここに挿入する必要があるためですが、どうすればよいでしょうか。(通常、サービスクラスは「Generic」を拡張するため、迅速なメーラーが含まれます。)