Hi Jeremy! Thank you for your idea. I'm sure it will work. I thought I separate the mailing function for the user for structural reasons. But the mailing module is extremely small and maybe my idea is only micro management. Nevertheless I am still interested in a solution with two models.
Best Regards, Tim On Nov 15, 9:27 pm, Jeremy Burns | Class Outfit <[email protected]> wrote: > Why not run this out of the User model? > > Jeremy Burns > Class Outfit > > [email protected]http://www.classoutfit.com > > On 15 Nov 2010, at 20:23, TimK wrote: > > > > > > > > > Hello Everybody! > > > I like to write a mail distributor. It shall send an email to all > > registered users with an valid email address. The distributor has no > > table in a data base, thus I set "var $useTable = false;". But I have > > a user module including the email address of every registered user. I > > thought I can work with the hasMany relation and a find('all') but it > > does not work. Here are a view code snippets. > > > @Mail Distributor->Model: > > var $hasMany = array( > > 'User' => array( > > 'className' => 'User', > > 'foreignKey' => 'id', > > ) > > ); > > > @Mail Distributor->Controller > > $email_addresses = $this->Mailinglist->find('all'); > > > Can anyone help me here? > > Best Regards, > > Tim > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
