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( me@somewhere.com );
$mail->from( you@somewhere.com );
$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( me@somewhere.com , you@somewhere.com , 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?