I have built a model in some of my MVC websites to assist with sending emails, generally I do something like this
$mail = new Mail_Model;
$mail->to('[email protected]');
$mail->from('[email protected]');
$mail->subject('hello');
$mail->body('hello how are you');
$mail->send();
I know the model is meant to model data - so is what I'm doing a violation of that? Should it be a helper class instead? Something like...
Mail::send('[email protected]', '[email protected]', 'hello', 'hello how are you');
That second one doesn't read as well to me.. of course I could pass in an array with named keys to make it more readable.
So is my Mail model violating what a model should be in the MVC paradigm?