Mai template

Hello All,

I have used yiimailmessage extension.

here is my code:—

$message = new YiiMailMessage;

	   $message->view = 'rejectedmail';

           $message->setBody(array('model'=>$model,'profiledata'=>$profiledata,), 'text/html');

	   $message->subject = 'New Registration';


	   $message->from = ('');


now in view file "rejectedemail"

i have written like this

now how can i replace this tags using preg_replace

This is 1 ex i got from net

function MailToForgotPass($Email, $userName, $Password) {

	$emailcontent = file_get_contents(SITE_SECURE_PATH."mailtemplates/mailforgotpass.html");

	$emailcontent = str_replace("[USERNAME]",$userName,$emailcontent);

	$emailcontent = str_replace("[PASSWORD]",$Password,$emailcontent);

	$emailcontent = str_replace("[IMAGE_PATH]",SITE_IMAGE_PATH,$emailcontent);

	$emailcontent = str_replace("[SITE_MAIL]",SITE_MAIL,$emailcontent);

	$emailcontent = str_replace("[SITE_URL]",SITE_URL,$emailcontent);

	$mail = new PHPMailer();



	$mail->Subject = "Account Activation Link From the DRC Job portal.";

	$mail->Body = $emailcontent;



	return 1;


I want to do like this…

thank you in advance

plz reply me as soon as possible