Thank you Bernhard, this reply is very usefull! I'll call the mailer
in this way
For the others: now my function works. There was a problem in exim
configuration with one of the addresses (so one address not working is
enough to invalid the entire email).
I have to realize a newsletter now.. but i
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 ha
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 eventdispatc
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 wrote:
> On 2 Lug, 05:58, pghoratiu wrote:
>
> > From the first one the actual send is missing:
>
> > // send the email
> >
On 2 Lug, 05:58, pghoratiu 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 send it to
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 t
>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 wrote:
> Hi all.. I think it's a strange behavior: if I send email inside an
> action it will be sent. If I try t