I want to sent a mail in yii. the mail should be sent when the user is registerd. I want to know where I include the body of the message . I found the page "usercontroller.php" in the path "html/protected/modules/employee/controllers/usercontroller.php"
the page contain following function for mail senting
public function sendOutEmail($email, $model){
$message = new YiiMailMessage;
$message->view = 'registrationNewEmployee';
//userModel is passed to the view
$message->setBody(array('userModel'=>$model), 'text/html');
//$message->addTo($userModel->email);
$message->addTo($email);
//print_r($email);
//print_r($message->view);
//$message->from = Yii::app()->params['adminEmail'];
$message->from = 'admin@skyverse.com';
Yii::app()->mail->send($message);
}
[b]the code following is body setting command. where I add the content for mail
$message->setBody(array('userModel'=>$model), 'text/html');
[/b]
WHAT IS THIS ARRAY array(‘userModel’=>$model)… ? WHERE IS THE LOCATION OF THIS ARRAY…? HOW TO ADD CONTENT FOR THIS ARRAY