My mails are jot being sent whenever a user registers successfully through a form. Used to work properly but it stopped all of a sudden now. The form entries are caught in the database properly. Below is the controller code for mails to send.
public function actionIndex() { $model=new FilmclubMembersHome; // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if(isset($_POST['FilmclubMembersHome'])) { $model->attributes=$_POST['FilmclubMembersHome']; if($model->save()) { if($model->id != null){ $model->membership_id = $model->generateMembershipId($model->id); $model->update(); $rootImgUrl = $this->createAbsoluteUrl('/images/emailer'); $filmclubUrl = $this->createAbsoluteUrl('/site/filmclub'); $homeUrl = $this->createAbsoluteUrl('/'); $userFullName = $model->fname; $data = array('userFullName'=>$userFullName, 'rootImgUrl'=>$rootImgUrl, 'homeUrl'=>$homeUrl, 'filmclubUrl'=>$filmclubUrl, 'membershipId'=>$model->membership_id); $message = $this->renderPartial('//email/filmclub-home', $data, true); $subject = "Welcome to the MAMI Year Round Programme"; UserModule::sendMail(Yii::app()->params['mamiyearroundEmail'], $model->email, $subject, $message); Yii::app()->user->setFlash('registration',UserModule::t("Thank you for your registration.")); $this->refresh(); } } } $this->render('_form',array( 'model'=>$model, )); }