Welcome Guest, Not a member yet? Register   Sign In
Email Class - View as Message? [SOLVED]

Hi. Is it possible to use a view (with html) as the message for the Email Class?

I tried with no luck. This is how the code looks:


$config['mailtype'] = 'html';

$message = $this->load->view('summary');




Thank you very much!

[eluser]GSV Sleeper Service[/eluser]
have you tried this?
$message = $this->load->view('summary','',true);
adding 'true' as the third parameter to load->view will return the view as a string.

You can pass also variables
$data['username'] = 'Joe';
$message = $this->load->view('summary',$data,TRUE);

Awesome, it works! Thank you very much! Smile

Theme © iAndrew 2016 - Forum software by © MyBB