I disagree that this is a good use case for the event dispatcher. The
event dispatcher is good for providing hooks for additional,
_optional_ functionality (like logging, profiling etc.)
Sending a mail upon form submission is not optional. This has to
happen. You want to be able to test that it
I don't embed the form.. where should i put this function if I want
that an email is sent when a new article is posted (in the backend)?
And why it doesn't work into the form class using
sfContext::getInstance(), and it works in an action using $this ?
@Richtermeister: I've never used
On 2 Lug, 05:58, pghoratiu pghora...@gmail.com wrote:
From the first one the actual send is missing:
// send the email
$this-getMailer()-send($mail);
gabriel
It still doesn't work..
--
If you want to report a vulnerability issue on symfony, please
doSave() is probably not the right place since it never gets called if
you embed the PostForm somewhere.
Johannes
On Jul 2, 3:12 pm, cosmy c.zec...@gmail.com wrote:
On 2 Lug, 05:58, pghoratiu pghora...@gmail.com wrote:
From the first one the actual send is missing:
//
From the first one the actual send is missing:
// send the email
$this-getMailer()-send($mail);
gabriel
On Jul 2, 5:25 am, Cosimo Zecchi c.zec...@gmail.com wrote:
Hi all.. I think it's a strange behavior: if I send email inside an
action it will be
Hey there,
overall this is a perfect case for using the eventdispatcher. That way
you can keep the form focused on what it's good at (validation), and
handle notifications outside. The form already has access to the
eventdispatcher, so all it takes is firing an event that carries the
post object