I am using YiiMail to sent emails via a Yii application, I have the following code however no email seems to be sent even though I don't get any form of errors appearing and the extension all appears in the correct location.
Can anyone suggest what I can do next, this is within a function hence the return at the end?
Note - the function returns true indicating it has sent... but I never get an email?? Any ideas why this is?
$message = new YiiMailMessage;
$message->encoder = Swift_Encoding::get8BitEncoding();
$message->view = 'parentApprovalEmail';
$message->from = Yii::app()->params['parentEmailSender'];
$message->to = $this->email;
$message->subject = sprintf(self::APPROVAL_EMAIL_SUBJECT, $name_organisation_or_student);
$message->setBody(array(
'data' => $this
), 'text/html');
return Yii::app()->mail->send($message);