On Sep 21, 1:43 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 9/21/07, deepc <[EMAIL PROTECTED]> wrote:
>
> > the idea was that any controller should be able to send emails with
> > one line of code, and without the necessity of defining text or
> > anything else.
> > just the userid and a type of mail. the rest should be held in
> > database.
>
> An apt solution would be to extend the component which you are using.
>
> Controller like functionality which needs to be used in several
> controllers === Component

Indeed :)!

And using a component with the same name as a model == component gets
overwritten by model and you get these wierd sql error messages which
correspond to component methods being called on a Model instance.

If you don't know what I mean, write how to do the following from a
controller:

Call the send method in the Email component
Call the findAll method in your Email model.
Call the send method in your Email model.

Hopefully that should cause an "Oh yeah..."

hth,

AD


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to