hi everybody
i want to be able to send email to user after registration with sonata
i trie this method:

public function create($object)
{
    parent::create($object);

    // send welcome email to new user
    $message = Swift_Message::newInstance()
        ->setSubject('LOL')
        ->setFrom('[email protected]')
        ->setTo('[email protected]')
        ->setBody('dummy message')
    ;


    
$this->getConfigurationPool()->getContainer()->get('mailer')->send($message);
}


But this don't work.

have i missing something

-- 
You received this message because you are subscribed to the Google Groups 
"sonata-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sonata-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to