public function send($name, $parameters = [], $locale = null, \Closure $messageModifier = null)
    {
        $mailDefinition = $this->provider->fetchMailDefinition($name, $parameters);
        $parsedMessage = $this->parser->parseMailDefinition($mailDefinition, $locale ?: $this->locale);

        $this->handleDefaults($parsedMessage);

        $this->mailer->send($parsedMessage, $messageModifier);
    }
public function send($name, $parameters = [], $locale = null, \Closure $messageModifier = null)
    {
        $mailDefinition = $this->provider->fetchMailDefinition($name, $parameters);
        $parsedMessage = $this->parser->parseMailDefinition($mailDefinition, $locale ?: $this->locale);

        $this->handleDefaults($parsedMessage);

        $this->mailer->send($parsedMessage, $messageModifier);
    }
public function send ( $ name , $ parameters = [ ] , $ locale = null , \ Closure $ messageModifier = null ) { $ mailDefinition = $ this -> provider -> fetchMailDefinition ( $ name , $ parameters ) ; $ parsedMessage = $ this -> parser -> parseMailDefinition ( $ mailDefinition , $ locale ? : $ this -> locale ) ; $ this -> handleDefaults ( $ parsedMessage ) ; $ this -> mailer -> send ( $ parsedMessage , $ messageModifier ) ; }
Sends out the system message

Examples:
<code>
// sends out AppBundle/Resources/emails/registration/confirmUser.xml.twig
$systemMailer->send('App:registration/confirmUser', ['user' => $user]);

// force locale of mail
$systemMailer->send('App:info-mail', ['user' => $user], 'de');

// attach file to mail
$systemMailer->send('App:message-with-pdf', [], null, function (\Swift_Message $message) {
$message->attach(\Swift_Attachment::fromPath('my-document.pdf'))
});
</code>

@param string   $name            The email to send out, format: YourBundle:emailXmlTemplateName
@param array    $parameters      The parameters passed to your email template xml
@param string   $locale          Overwrite default locale of session
@param callable $messageModifier Pass Closure to modify message before it is send (to attach files i.e.)
Sends out the system message