Sending email from Model |
[eluser]bewhite[/eluser]
Hi! I have problem with email. When I have tried to use it in the Controller then everything is ok. Now I have decided to separate all email related functions to the special class Mailer. Here is code: Code: class Mailer extends Model Victor
[eluser]xwero[/eluser]
Why do you want the class to be a child of the model class? I think if you want to create a separate mailer class you are better of with a class in the libraries directory. Code: class Mailer Code: //model
[eluser]Michael Ekoka[/eluser]
I second what xwero said. Model should be used for items such as database access and to a certain extent, validation. Emails are accessories to a web app and should go in libraries or plugins. |
Welcome Guest, Not a member yet? Register Sign In |