I am trying to use a custom class I have created to send out mail so I can keep the controller files thin. I created my custom class and put it in the components folder. I then added:
'sendMail' => array(
'class'=>'application.components.SendMail.',
),
underneath main components in my main config file.
This should allow me to access the class directly correct? I try using:
Yii::app()->SendMail->MailerConfirmation();
and:
Yii:app()->MailerConfirmation();
and all I end up with is errors.
Can anyone tell me how I include a custom component? Maybe I am doing this all wrong?