I am having a problem with a digit when I have to send mail from a model or controller. The fact is that in the controller I use both
This applies to PHP.
In the controller:
if (Post::get()){ $this->model->registerUser( ... ); $this->model->mailSendUserActivation();
In the model:
public function mailSendUserActivation(){ $mail = new \com\Mail();
It is right? Or should mail be sent from the controller?
Jonatan
source share