when to create component and when use helper function?
For example I want to send emails using templates.
I really dont know if the place of this is in the main.php components by creating CApplicationComponent, or just create class and few static functions?
What is the best?
For example I created pack of functions that email with templates etc. using Zend_Mail , dont know if It is right for me to actually create component for this or just use as static methods
An e-mail sender may have a lot of configurations, like SMTP login details and other parameters that you do not want to write every time you use this feature.
For instance, it is easier to set the SMTP details for sending e-mails in config/main.php and to send e-mails like this:
dckurushin, you are right. That is also a solution to do this, but that means that you must add a few new parameters to your application for every helper that requires configuration you add. This can be not-so-handy when the applications grows.
Creating components and configuring them individually may probably save some time when working with big applications.