Your mail sending code (Put in your view or controller as per the use) -
$to = 'demo@example.com'; //Email id, which you want to send an email
$from= 'your_email_id@gmail.com'; //Email id, provide your email id
$mail=Yii::app()->Smtpmail;
$mail->SetFrom($from, 'Yii Demo');
$mail->Subject = 'your email subject';
$mail->MsgHTML('Testing...');
$mail->AddAddress($to, "");
$mail->IsHTML(true);
$mail->Send();