[FLOW3-general] Understanding MVC - Sending email, where?

"Christian Müller (Kitsunet)" christian.mueller at typo3.org
Wed Jan 25 14:47:20 CET 2012


Hi Kira,

I think it would be in order to define something like an EmailService to 
which you give the ContentPage Subscribers and it sends the mail and 
call this Service in your publish() method.

If you want to get more sophisticated you could define either an 
observer for the ContentPages so that the observer is notified when 
publishing happened (you don't even need a real observer, you can use 
Signal / Slots for that) and additionally you could abstract what should 
happen on publish by defining something linke publishing rules, one of 
them being to send the mail.

Cheers,
Christian

On 25/01/12 14:26, Kira Backes wrote:
> Hello list,
>
>
>
> let’s say I have a model ContentPage and users can subscribe those
> ContentPages (the list of subscribers is saved in the model).
> Subscribers shall receive an email about the ContentPage whenever it is
> published. It is my understanding that I would create a method
> publish(), add it to the model ContentPage and in this method I would
> get the list of subscribers and send them the email. Is it correct to
> send the emails in the model?
>
>
>
> rgds, Kira Backes




More information about the FLOW3-general mailing list